mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
gnu: python-pendulum: Update to 3.1.0.
* gnu/packages/rust-crates.scm (pendulum): Record crates. * gnu/packages/time.scm (python-pendulum): Update to 3.1.0. [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:imported-modules, #:modules, #:phases>: Set them for maturin. Remove former 'add-setup.py phase. [native-inputs]: Add maturin, python-pytest, python-pytest-benchmark, python-pytz, python-setuptools, python-time-machine, rust, rust:cargo. [inputs]: Add pendulum cargo-inputs. [propagated-inputs]: Replace python-pytzdata by python-tzdata. [description]: Improve style. Change-Id: I056ca219e52ccd9d61a083d3eba2e7f72c945926 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
b1179ad62d
commit
fe6941a641
2 changed files with 69 additions and 36 deletions
|
|
@ -42020,6 +42020,29 @@
|
|||
rust-windows-x86-64-msvc-0.48.5
|
||||
rust-windows-x86-64-msvc-0.52.6
|
||||
rust-winnow-0.7.11))
|
||||
(pendulum =>
|
||||
(list rust-autocfg-1.4.0
|
||||
rust-cc-1.2.19
|
||||
rust-cfg-if-1.0.0
|
||||
rust-heck-0.5.0
|
||||
rust-indoc-2.0.6
|
||||
rust-libc-0.2.172
|
||||
rust-memoffset-0.9.1
|
||||
rust-once-cell-1.21.3
|
||||
rust-portable-atomic-1.11.0
|
||||
rust-proc-macro2-1.0.95
|
||||
rust-pyo3-0.24.1
|
||||
rust-pyo3-build-config-0.24.1
|
||||
rust-pyo3-ffi-0.24.1
|
||||
rust-pyo3-macros-0.24.1
|
||||
rust-pyo3-macros-backend-0.24.1
|
||||
rust-python3-dll-a-0.2.13
|
||||
rust-quote-1.0.40
|
||||
rust-shlex-1.3.0
|
||||
rust-syn-2.0.100
|
||||
rust-target-lexicon-0.13.2
|
||||
rust-unicode-ident-1.0.18
|
||||
rust-unindent-0.2.4))
|
||||
(pijul =>
|
||||
(list rust-addr2line-0.24.2
|
||||
rust-adler2-2.0.0
|
||||
|
|
|
|||
|
|
@ -57,9 +57,12 @@
|
|||
#:use-module (gnu packages python-build)
|
||||
#:use-module (gnu packages python-check)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages rust)
|
||||
#:use-module (gnu packages rust-apps)
|
||||
#:use-module (gnu packages terminals)
|
||||
#:use-module (gnu packages textutils)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (guix build-system cargo)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system go)
|
||||
#:use-module (guix build-system pyproject)
|
||||
|
|
@ -313,48 +316,55 @@ saving time. Almost all of the Olson timezones are supported.")
|
|||
(define-public python-pendulum
|
||||
(package
|
||||
(name "python-pendulum")
|
||||
(version "2.1.2")
|
||||
(version "3.1.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "pendulum" version))
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/sdispater/pendulum")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "01zjc245w08j0xryrgrq9vng59q1cl5ry0hcpw5rj774pyhhqsmh"))))
|
||||
(build-system python-build-system)
|
||||
;; XXX: The PyPI distribution lacks tests, and the upstream repository
|
||||
;; lacks a setup.py!
|
||||
(base32 "0rhh5hnrjbi1ams5ylnymari522k4v2kdk82qzafvmykkcvild36"))))
|
||||
(build-system pyproject-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; Add setup.py to fix the build. Otherwise, the build will fail with
|
||||
;; "no setup.py found".
|
||||
;;
|
||||
;; Upstream uses Poetry to build python-pendulum, including parts
|
||||
;; written in C. Here, we simply add a setup.py file and do not build
|
||||
;; the parts written in C. This is possible because python-pendulum
|
||||
;; falls back on pure Python code when the C parts are not available
|
||||
;; (reference: build.py).
|
||||
(add-after 'unpack 'add-setup.py
|
||||
(lambda _
|
||||
(call-with-output-file "setup.py"
|
||||
(lambda (port)
|
||||
(format port
|
||||
"from setuptools import find_packages, setup
|
||||
setup(name='pendulum',
|
||||
version='~a',
|
||||
packages=find_packages())
|
||||
"
|
||||
,version))))))
|
||||
;; XXX: The PyPI distribution lacks tests.
|
||||
#:tests? #f))
|
||||
(propagated-inputs
|
||||
(list python-dateutil python-pytzdata))
|
||||
(list
|
||||
#:imported-modules `(,@%cargo-build-system-modules
|
||||
,@%pyproject-build-system-modules)
|
||||
#:modules '(((guix build cargo-build-system)
|
||||
#:prefix cargo:)
|
||||
(guix build pyproject-build-system)
|
||||
(guix build utils))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'prepare-cargo-build-system
|
||||
(lambda args
|
||||
(with-directory-excursion "rust"
|
||||
(for-each (lambda (phase)
|
||||
(format #t "Running cargo phase: ~a~%" phase)
|
||||
(apply (assoc-ref cargo:%standard-phases phase)
|
||||
#:cargo-target #$(cargo-triplet) args))
|
||||
'(unpack-rust-crates configure
|
||||
check-for-pregenerated-files
|
||||
patch-cargo-checksums))))))))
|
||||
(native-inputs
|
||||
(list maturin
|
||||
python-pytest
|
||||
python-pytest-benchmark
|
||||
python-pytz
|
||||
python-setuptools
|
||||
python-time-machine
|
||||
rust
|
||||
`(,rust "cargo")))
|
||||
(inputs (cargo-inputs 'pendulum))
|
||||
(propagated-inputs (list python-dateutil python-tzdata))
|
||||
(home-page "https://github.com/sdispater/pendulum")
|
||||
(synopsis "Alternate API for Python datetimes")
|
||||
(description "Pendulum is a drop-in replacement for the standard
|
||||
@code{datetime} class, providing an alternative API. As it inherits from the
|
||||
standard @code{datetime} all @code{datetime} instances can be replaced by
|
||||
Pendulum instances.")
|
||||
(description
|
||||
"Pendulum is a drop-in replacement for the standard @code{datetime}
|
||||
class, providing an alternative API. As it inherits from the standard
|
||||
@code{datetime} all @code{datetime} instances can be replaced by Pendulum
|
||||
instances.")
|
||||
(license expat)))
|
||||
|
||||
(define-public python-dateutil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue