archspec: add v0.2.0, deprecate old versions (#36653)

* archspec: add v0.2.0, deprecate old versions

* Simplify version ranges

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Remove py-setuptools

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Massimiliano Culpo 2023-04-05 20:51:12 +02:00 committed by GitHub
parent 3e1c6b27a4
commit a080cf0193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,26 +11,46 @@ class PyArchspec(PythonPackage):
"""
homepage = "https://archspec.readthedocs.io/en/latest/"
pypi = "archspec/archspec-0.1.1.tar.gz"
pypi = "archspec/archspec-0.2.0.tar.gz"
maintainers("alalazo")
version("0.1.3", sha256="a1aa7abde4d4ce38d115dfd572584906fa8e192e3272b8897e7b4fa1213ec27c")
version("0.1.2", sha256="8bb998370f0dc3e509d57c13724ab4109d761fd74af20da26fbe513b0fe01c46")
version("0.1.1", sha256="34bafad493b41208857232e21776216d716de37ab051a6a4a1cc1653f7e26423")
version("0.1.0", sha256="a4431d0bbe9c9dd7b293c39d8e7590034d512ce5f5a1278a6cbdf61b33f7202d")
version("0.2.0", sha256="6aaba5ebdb5c3633c400d8c221a6a18716da0c64b367a8509f4217b22e91a5f5")
version(
"0.1.3",
sha256="a1aa7abde4d4ce38d115dfd572584906fa8e192e3272b8897e7b4fa1213ec27c",
deprecated=True,
)
version(
"0.1.2",
sha256="8bb998370f0dc3e509d57c13724ab4109d761fd74af20da26fbe513b0fe01c46",
deprecated=True,
)
version(
"0.1.1",
sha256="34bafad493b41208857232e21776216d716de37ab051a6a4a1cc1653f7e26423",
deprecated=True,
)
version(
"0.1.0",
sha256="a4431d0bbe9c9dd7b293c39d8e7590034d512ce5f5a1278a6cbdf61b33f7202d",
deprecated=True,
)
with when("@0.1"):
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("py-click@7.1.2:7", type=("build", "run"))
depends_on("py-six@1.13.0:1", type=("build", "run"))
depends_on("py-setuptools", type="build")
with when("@0.2.0"):
depends_on("py-click@8", type=("build", "run"))
depends_on("python@3.6:", when="@0.2:", type=("build", "run"))
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.stage.source_path):
if self.spec.satisfies("@:0.1.3"):
with working_dir(self.stage.source_path):
filter_file("poetry>=0.12", "poetry_core>=1.0.0", "pyproject.toml")
filter_file("poetry.masonry.api", "poetry.core.masonry.api", "pyproject.toml")