Generate BuildRequires on extras in lower case
This commit is contained in:
parent
7e1a8fd079
commit
99ed4639da
@ -107,6 +107,8 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856
|
|||||||
* Mon Mar 29 2021 Miro Hrončok <mhroncok@redhat.com> - 0-39
|
* Mon Mar 29 2021 Miro Hrončok <mhroncok@redhat.com> - 0-39
|
||||||
- Handle tox provision (tox.requires / tox.minversion)
|
- Handle tox provision (tox.requires / tox.minversion)
|
||||||
- Fixes: rhbz#1922495
|
- Fixes: rhbz#1922495
|
||||||
|
- Generate BuildRequires on extras in lower case
|
||||||
|
- Fixes: rhbz#1937944
|
||||||
|
|
||||||
* Sun Feb 07 2021 Miro Hrončok <mhroncok@redhat.com> - 0-38
|
* Sun Feb 07 2021 Miro Hrončok <mhroncok@redhat.com> - 0-38
|
||||||
- Include nested __pycache__ directories in %%pyproject_save_files
|
- Include nested __pycache__ directories in %%pyproject_save_files
|
||||||
|
@ -109,7 +109,7 @@ class Requirements:
|
|||||||
self.missing_requirements = True
|
self.missing_requirements = True
|
||||||
|
|
||||||
if self.generate_extras:
|
if self.generate_extras:
|
||||||
extra_names = [f'{name}[{extra}]' for extra in sorted(requirement.extras)]
|
extra_names = [f'{name}[{extra.lower()}]' for extra in sorted(requirement.extras)]
|
||||||
else:
|
else:
|
||||||
extra_names = []
|
extra_names = []
|
||||||
|
|
||||||
|
@ -79,13 +79,13 @@ Build system dependencies in pyproject.toml with extras:
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
"foo",
|
"foo",
|
||||||
"bar[baz] > 5",
|
"bar[bAz] > 5",
|
||||||
"ne!=1",
|
"ne!=1",
|
||||||
"ge>=1.2",
|
"ge>=1.2",
|
||||||
"le <= 1.2.3",
|
"le <= 1.2.3",
|
||||||
"lt < 1.2.3.4 ",
|
"lt < 1.2.3.4 ",
|
||||||
" gt > 1.2.3.4.5",
|
" gt > 1.2.3.4.5",
|
||||||
"multi[extras1,extras2] == 6.0",
|
"multi[Extras1,Extras2] == 6.0",
|
||||||
"combo >2, <5, != 3.0.0",
|
"combo >2, <5, != 3.0.0",
|
||||||
"invalid!!ignored",
|
"invalid!!ignored",
|
||||||
"py2 ; python_version < '2.7'",
|
"py2 ; python_version < '2.7'",
|
||||||
@ -118,7 +118,7 @@ Build system dependencies in pyproject.toml without extras:
|
|||||||
pyproject.toml: |
|
pyproject.toml: |
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
"bar[baz] > 5",
|
"bar[Baz] > 5",
|
||||||
"multi[extras1,extras2] == 6.0",
|
"multi[extras1,extras2] == 6.0",
|
||||||
]
|
]
|
||||||
expected: |
|
expected: |
|
||||||
@ -262,6 +262,7 @@ Run dependencies with multiple extras:
|
|||||||
wheel: 1
|
wheel: 1
|
||||||
pyyaml: 1
|
pyyaml: 1
|
||||||
include_runtime: true
|
include_runtime: true
|
||||||
|
generate_extras: true
|
||||||
extras:
|
extras:
|
||||||
- testing,more-testing
|
- testing,more-testing
|
||||||
- even-more-testing , cool-feature
|
- even-more-testing , cool-feature
|
||||||
@ -272,7 +273,7 @@ Run dependencies with multiple extras:
|
|||||||
'testing': ['dep1'],
|
'testing': ['dep1'],
|
||||||
'more-testing': ['dep2'],
|
'more-testing': ['dep2'],
|
||||||
'even-more-testing': ['dep3'],
|
'even-more-testing': ['dep3'],
|
||||||
'cool-feature': ['dep4'],
|
'cool-feature': ['dep4[FOO,BAR]'],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
expected: |
|
expected: |
|
||||||
@ -280,6 +281,8 @@ Run dependencies with multiple extras:
|
|||||||
python3dist(wheel)
|
python3dist(wheel)
|
||||||
python3dist(wheel)
|
python3dist(wheel)
|
||||||
python3dist(dep4)
|
python3dist(dep4)
|
||||||
|
python3dist(dep4[bar])
|
||||||
|
python3dist(dep4[foo])
|
||||||
python3dist(dep3)
|
python3dist(dep3)
|
||||||
python3dist(dep2)
|
python3dist(dep2)
|
||||||
python3dist(dep1)
|
python3dist(dep1)
|
||||||
@ -325,6 +328,7 @@ Tox extras:
|
|||||||
wheel: 1
|
wheel: 1
|
||||||
tox: 3.5.3
|
tox: 3.5.3
|
||||||
tox-current-env: 0.0.6
|
tox-current-env: 0.0.6
|
||||||
|
generate_extras: true
|
||||||
toxenv:
|
toxenv:
|
||||||
- py3
|
- py3
|
||||||
setup.py: |
|
setup.py: |
|
||||||
@ -335,7 +339,7 @@ Tox extras:
|
|||||||
install_requires=['inst'],
|
install_requires=['inst'],
|
||||||
extras_require={
|
extras_require={
|
||||||
'extra1': ['dep11 > 11', 'dep12'],
|
'extra1': ['dep11 > 11', 'dep12'],
|
||||||
'extra2': ['dep21', 'dep22', 'dep23'],
|
'extra2': ['dep21', 'dep22', 'dep23', 'extra_dep[EXTRA_DEP]'],
|
||||||
'nope': ['nopedep'],
|
'nope': ['nopedep'],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -362,6 +366,8 @@ Tox extras:
|
|||||||
python3dist(dep21)
|
python3dist(dep21)
|
||||||
python3dist(dep22)
|
python3dist(dep22)
|
||||||
python3dist(dep23)
|
python3dist(dep23)
|
||||||
|
python3dist(extra-dep)
|
||||||
|
python3dist(extra-dep[extra_dep])
|
||||||
result: 0
|
result: 0
|
||||||
|
|
||||||
Tox provision unsatisfied:
|
Tox provision unsatisfied:
|
||||||
|
Loading…
Reference in New Issue
Block a user