gnu: python-pbr: Rework bootstrapping.

For breaking the cyclic build, formerly a separate (older) version was used
for bootstrapping.  Now we use the same version just without tests and without
test dependencies.

* gnu/packages/python.scm (python-pbr-0.11, python2-pbr-0.11):
  replace by … (python-pbr-minimal, python2-pbr-minimal).
  (python-pbr) inherit from python-pbr-minimal, adding the requirements for
  testing and building the documentation.
  (python-fixtures) [native-inputs] Use python-pbr-minimal here.
  (python-testrepository): [native-inputs] Add it here, it was a missing
  dependency.
master
Hartmut Goebel 2016-10-13 14:46:35 +02:00
parent b2e66edf52
commit d2a8db92fe
No known key found for this signature in database
GPG Key ID: 634A8DFFD3F631DF
1 changed files with 33 additions and 71 deletions

View File

@ -1941,104 +1941,65 @@ protocol.")
(define-public python2-subunit (define-public python2-subunit
(package-with-python2 python-subunit)) (package-with-python2 python-subunit))
;; Recent versions of python-fixtures need a recent version of python-pbr, ;; Recent versions of python-fixtures and python-testrepository need
;; which needs a recent version of python-fixtures. To fix this circular ;; python-pbr for packaging, which itself needs these two packages for
;; dependency, we keep old versions of python-fixtures and python-pbr to ;; testing.
;; bootstrap the whole thing: ;; To fix this circular dependency, we use a build of python-pbr, based on the
;; - python-fixtures-0.3.16 is used to build python-pbr-0.11 ;; same source, just without any test dependencies and with tests disabled.
;; - python-pbr-0.11 is used to build python-fixtures ;; python-pbr-minmal is then used to package python-fixtures and
;; - python-fixtures is used to build python-pbr ;; python-testrepository.
(define-public python-fixtures-0.3.16 ;; Strictly speaking we currently could remove the test-requirements from the
;; normal python-pbr package (and save this package) since test are disabled
;; there anyway. But this may change in future.
(define python-pbr-minimal
(package (package
(name "python-fixtures") (name "python-pbr-minimal")
(version "0.3.16") (version "1.8.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (pypi-uri "pbr" version))
"https://pypi.python.org/packages/source/f/fixtures/fixtures-"
version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc")))) "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
'(#:tests? #f)) ; no setup.py test command `(#:tests? #f))
(home-page "https://launchpad.net/python-fixtures") (home-page "http://docs.openstack.org/developer/pbr/")
(synopsis "Python test fixture library") (synopsis "Minimal build of python-pbr used for bootstrapping")
(description (description
"Fixtures provides a way to create reusable state, useful when writing "Used only for bootstrapping python2-pbr, you should not need this.")
Python tests.")
(license (list license:bsd-3 license:asl2.0)))) ; at user's option
(define-public python2-fixtures-0.3.16
(package-with-python2 python-fixtures-0.3.16))
(define-public python-pbr-0.11
(package
(name "python-pbr")
(version "0.11.0")
(source
(origin
(method url-fetch)
(uri (string-append
"https://pypi.python.org/packages/source/p/pbr/pbr-"
version ".tar.gz"))
(sha256
(base32
"0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ;; Most tests seem to use the Internet.
(propagated-inputs
`(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)))
(home-page "https://launchpad.net/pbr")
(synopsis "Change the default behavior of Pythons setuptools")
(description
"Python Build Reasonableness (PBR) is a library that injects some useful
and sensible default behaviors into your setuptools run.")
(license license:asl2.0))) (license license:asl2.0)))
(define-public python2-pbr-0.11 (define python2-pbr-minimal
(package-with-python2 python-pbr-0.11)) (package-with-python2 python-pbr-minimal))
(define-public python-pbr (define-public python-pbr
(package (package
(inherit python-pbr-minimal)
(name "python-pbr") (name "python-pbr")
(version "1.8.1")
(source
(origin
(method url-fetch)
(uri (string-append
"https://pypi.python.org/packages/source/p/pbr/pbr-"
version
".tar.gz"))
(sha256
(base32
"0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
(build-system python-build-system)
(arguments (arguments
`(#:tests? #f)) ;; Most tests seem to use the Internet. `(#:tests? #f)) ;; Most tests seem to use the Internet.
(propagated-inputs (propagated-inputs
`(("python-testrepository" ,python-testrepository) `(("git" ,git))) ;; pbr actually uses the "git" binary.
("git" ,git))) ;; pbr actually uses the "git" binary. (native-inputs
(inputs
`(("python-fixtures" ,python-fixtures) `(("python-fixtures" ,python-fixtures)
("python-mimeparse" ,python-mimeparse) ;; discover, coverage, hacking, subunit
("python-mock" ,python-mock) ("python-mock" ,python-mock)
("python-six" ,python-six) ("python-six" ,python-six)
("python-sphinx" ,python-sphinx) ("python-sphinx" ,python-sphinx)
("python-testrepository" ,python-testrepository) ("python-testrepository" ,python-testrepository)
("python-testresources" ,python-testresources) ("python-testresources" ,python-testresources)
("python-testscenarios" ,python-testscenarios) ("python-testscenarios" ,python-testscenarios)
("python-testtools" ,python-testtools) ("python-testtools" ,python-testtools)
("python-virtualenv" ,python-virtualenv))) ("python-virtualenv" ,python-virtualenv)))
(home-page "https://launchpad.net/pbr") (synopsis "Enhance the default behavior of Pythons setuptools")
(synopsis "Change the default behavior of Pythons setuptools")
(description (description
"Python Build Reasonableness (PBR) is a library that injects some useful "Python Build Reasonableness (PBR) is a library that injects some useful
and sensible default behaviors into your setuptools run.") and sensible default behaviors into your setuptools run. It will set
(license license:asl2.0))) versions, process requirements files and generate AUTHORS and ChangeLog file
from git information.
")))
(define-public python2-pbr (define-public python2-pbr
(package-with-python2 python-pbr)) (package-with-python2 python-pbr))
@ -2058,7 +2019,7 @@ and sensible default behaviors into your setuptools run.")
(propagated-inputs (propagated-inputs
`(("python-six" ,python-six))) `(("python-six" ,python-six)))
(native-inputs (native-inputs
`(("python-pbr-0.11" ,python-pbr-0.11) `(("python-pbr-minimal" ,python-pbr-minimal)
("python-testtools" ,python-testtools))) ("python-testtools" ,python-testtools)))
(home-page "https://launchpad.net/python-fixtures") (home-page "https://launchpad.net/python-fixtures")
(synopsis "Python test fixture library") (synopsis "Python test fixture library")
@ -2088,6 +2049,7 @@ Python tests.")
`(("python-testtools" ,python-testtools))) `(("python-testtools" ,python-testtools)))
(native-inputs (native-inputs
`(("python-fixtures" ,python-fixtures) `(("python-fixtures" ,python-fixtures)
("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
("python-subunit" ,python-subunit) ("python-subunit" ,python-subunit)
("python-mimeparse" ,python-mimeparse))) ("python-mimeparse" ,python-mimeparse)))
(home-page "https://launchpad.net/testrepository") (home-page "https://launchpad.net/testrepository")