archspec: remove pyproject.toml to workaround PEP517 (#28956)
* archspec: remove pyproject.toml to workaround PEP517 If pyproject.toml is in the folder, that is preferred to the setup.py packaged by poetry itself. Adding a dependency on poetry for deploying a pure Python package seems wasteful, since the package to be deployed just needs to be copied in place, so we don't want to built rust for that. * archspec: patch pyproject.toml to comply to PEP517 See https://python-poetry.org/docs/pyproject/#poetry-and-pep-517 * Fix style issues
This commit is contained in:
parent
dea9766336
commit
5b34b947a8
@ -20,3 +20,13 @@ class PyArchspec(PythonPackage):
|
|||||||
depends_on('py-six@1.13.0:1', type=('build', 'run'))
|
depends_on('py-six@1.13.0:1', type=('build', 'run'))
|
||||||
|
|
||||||
depends_on('py-setuptools', type='build')
|
depends_on('py-setuptools', type='build')
|
||||||
|
depends_on('py-poetry-core@1.0.0:', type='build')
|
||||||
|
|
||||||
|
def patch(self):
|
||||||
|
# See https://python-poetry.org/docs/pyproject/#poetry-and-pep-517
|
||||||
|
with working_dir(self.build_directory):
|
||||||
|
if self.spec.satisfies('@:0.1.3'):
|
||||||
|
filter_file("poetry>=0.12", "poetry_core>=1.0.0", 'pyproject.toml')
|
||||||
|
filter_file(
|
||||||
|
"poetry.masonry.api", "poetry.core.masonry.api", 'pyproject.toml'
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user