From 441a76b646b05137d04c923a7496704d33cc0314 Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 12 Nov 2021 19:31:47 +0100 Subject: New version: py-prometheus-client 0.12.0 ... (#27410) * New version: py-prometheus-client 0.12.0; new dependency (py-twisted) version 21.7.0 + it's dependencies * Apply suggestions from code review (1/?) Co-authored-by: Adam J. Stewart * Changes from review (2/?) * Changes from review (3/?) * Changes from review (4/?) Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-automat/package.py | 22 ++++++ .../builtin/packages/py-constantly/package.py | 17 +++++ .../repos/builtin/packages/py-hyperlink/package.py | 20 ++++++ .../builtin/packages/py-incremental/package.py | 17 +++++ .../packages/py-prometheus-client/package.py | 5 ++ .../repos/builtin/packages/py-twisted/package.py | 83 +++++++++++++++++++++- 6 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/py-automat/package.py create mode 100644 var/spack/repos/builtin/packages/py-constantly/package.py create mode 100644 var/spack/repos/builtin/packages/py-hyperlink/package.py create mode 100644 var/spack/repos/builtin/packages/py-incremental/package.py diff --git a/var/spack/repos/builtin/packages/py-automat/package.py b/var/spack/repos/builtin/packages/py-automat/package.py new file mode 100644 index 0000000000..71c7f16a1d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-automat/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAutomat(PythonPackage): + """Self-service finite-state machines for the programmer on the go.""" + + homepage = "https://github.com/glyph/Automat" + pypi = "Automat/Automat-20.2.0.tar.gz" + + version('20.2.0', sha256='7979803c74610e11ef0c0d68a2942b152df52da55336e0c9d58daf1831cbdf33') + + depends_on('py-setuptools', type='build') + depends_on('py-setuptools-scm', type='build') + depends_on('py-m2r', type='build') + + depends_on('py-attrs@19.2.0:', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-constantly/package.py b/var/spack/repos/builtin/packages/py-constantly/package.py new file mode 100644 index 0000000000..fe90278fc6 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-constantly/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyConstantly(PythonPackage): + """Symbolic constants in Python""" + + homepage = "https://github.com/twisted/constantly" + pypi = "constantly/constantly-15.1.0.tar.gz" + + version('15.1.0', sha256='586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-hyperlink/package.py b/var/spack/repos/builtin/packages/py-hyperlink/package.py new file mode 100644 index 0000000000..fbaa2adf72 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-hyperlink/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyHyperlink(PythonPackage): + """A featureful, immutable, and correct URL for Python.""" + + homepage = "https://github.com/python-hyper/hyperlink" + pypi = "hyperlink/hyperlink-21.0.0.tar.gz" + + version('21.0.0', sha256='427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b') + + depends_on('python@2.6:2,3.4:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-idna@2.5:', type=('build', 'run')) + depends_on('py-typing', when='^python@:3.4', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-incremental/package.py b/var/spack/repos/builtin/packages/py-incremental/package.py new file mode 100644 index 0000000000..4fb8cd26c0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-incremental/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyIncremental(PythonPackage): + """A small library that versions your Python projects.""" + + homepage = "https://github.com/twisted/incremental" + pypi = "incremental/incremental-21.3.0.tar.gz" + + version('21.3.0', sha256='02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-prometheus-client/package.py b/var/spack/repos/builtin/packages/py-prometheus-client/package.py index 9bd8df3a64..160a5c2c09 100644 --- a/var/spack/repos/builtin/packages/py-prometheus-client/package.py +++ b/var/spack/repos/builtin/packages/py-prometheus-client/package.py @@ -11,6 +11,7 @@ class PyPrometheusClient(PythonPackage): pypi = "prometheus_client/prometheus_client-0.7.1.tar.gz" + version('0.12.0', sha256='1b12ba48cee33b9b0b9de64a1047cbd3c5f2d0ab6ebcead7ddda613a750ec3c5') version('0.7.1', sha256='71cd24a2b3eb335cb800c7159f423df1bd4dcd5171b234be15e3f31ec9f622da') version('0.7.0', sha256='ee0c90350595e4a9f36591f291e6f9933246ea67d7cd7d1d6139a9781b14eaae') version('0.5.0', sha256='e8c11ff5ca53de6c3d91e1510500611cafd1d247a937ec6c588a0a7cc3bef93c') @@ -18,7 +19,11 @@ class PyPrometheusClient(PythonPackage): variant('twisted', default=False, description='Expose metrics as a twisted resource') depends_on('py-setuptools', type='build') + # Notice: prometheus_client/twisted/_exposition.py imports 'twisted.web.wsgi' + # which was not ported to Python 3 until twisted 16.0.0 depends_on('py-twisted', type=('build', 'run'), when='+twisted') + depends_on('py-twisted@16:', type=('build', 'run'), when='@0.12.0: +twisted ^python@3:') + depends_on('python@2.7:2,3.4:', type=('build', 'run'), when='@0.12.0:') @property def import_modules(self): diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py index 82354c3456..18dbc1527b 100644 --- a/var/spack/repos/builtin/packages/py-twisted/package.py +++ b/var/spack/repos/builtin/packages/py-twisted/package.py @@ -9,11 +9,92 @@ from spack import * class PyTwisted(PythonPackage): """An asynchronous networking framework written in Python""" homepage = "https://twistedmatrix.com/" - pypi = "Twisted/Twisted-15.3.0.tar.bz2" + pypi = "Twisted/Twisted-21.7.0.tar.gz" + version('21.7.0', sha256='2cd652542463277378b0d349f47c62f20d9306e57d1247baabd6d1d38a109006') version('15.4.0', sha256='78862662fa9ae29654bc2b9d349c3f1d887e6b2ed978512c4442d53ea861f05c') version('15.3.0', sha256='025729751cf898842262375a40f70ae1d246daea88369eab9f6bb96e528bf285') + depends_on('python@3.6.7:', type=('build', 'run'), when='@21.7.0:') + depends_on('py-setuptools', type='build') + depends_on('py-setuptools@35.0.2:', type='build', when='@21.7.0:') + depends_on('py-zope-interface@3.6.0:', type=('build', 'run'), when='^python@:2') depends_on('py-zope-interface@4.0.2:', type=('build', 'run'), when='^python@3:') + depends_on('py-zope-interface@4.4.2:', type=('build', 'run'), when='@21.7.0:') + + depends_on('py-incremental@21.3.0:', type=('build', 'run'), when='@21.7.0:') + depends_on('py-constantly@15.1:', type=('build', 'run'), when='@21.7.0:') + depends_on('py-automat@0.8.0:', type=('build', 'run'), when='@21.7.0:') + depends_on('py-hyperlink@17.1.1:', type=('build', 'run'), when='@21.7.0:') + depends_on('py-attrs@19.2.0:', type=('build', 'run'), when='@21.7.0:') + depends_on('py-typing-extensions@3.6.5:', type=('build', 'run'), when='@21.7.0:') + + def url_for_version(self, version): + url = "https://pypi.io/packages/source/T/Twisted/" + + if version <= Version('20.3.0'): + url += 'Twisted-{0}.tar.bz2' + else: + url += 'Twisted-{0}.tar.gz' + + url = url.format(version) + return url + + @property + def import_modules(self): + modules = ['twisted', + 'twisted.positioning', + 'twisted.positioning.test', + 'twisted.protocols', + 'twisted.protocols.test', + 'twisted.protocols.haproxy', + 'twisted.protocols.haproxy.test', + 'twisted.web', + 'twisted.web._auth', + 'twisted.web.test', + 'twisted.scripts', + 'twisted.scripts.test', + 'twisted.runner', + 'twisted.runner.test', + 'twisted.cred', + 'twisted.cred.test', + 'twisted.plugins', + 'twisted.enterprise', + 'twisted.logger', + 'twisted.logger.test', + 'twisted.persisted', + 'twisted.persisted.test', + 'twisted.names', + 'twisted.names.test', + 'twisted.pair', + 'twisted.pair.test', + 'twisted.test', + 'twisted.tap', + 'twisted.python', + 'twisted.python.test', + 'twisted.trial', + 'twisted.trial._dist', + 'twisted.trial._dist.test', + 'twisted.trial.test', + 'twisted.words', + 'twisted.words.protocols', + 'twisted.words.protocols.jabber', + 'twisted.words.im', + 'twisted.words.test', + 'twisted.words.xish', + 'twisted.spread', + 'twisted.spread.test', + 'twisted.conch', + 'twisted.conch.scripts', + 'twisted.conch.ui', + 'twisted.conch.client', + 'twisted.conch.openssh_compat', + 'twisted.conch.test', + 'twisted.conch.insults', + 'twisted.conch.ssh', + 'twisted.internet', + 'twisted.internet.test'] + + return modules -- cgit v1.2.3-70-g09d2