summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-06-24 22:25:28 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-06-26 22:10:38 -0400
commit6cd019638742fe0ef7936be43001ada99c5875ab (patch)
treeca3bbcbf6a75b8dd11ffa2ec9ad4c1adbe6da0c4
parentgnu: python-setuptools-scm: Move to (gnu packages python-build). (diff)
downloadguix-6cd019638742fe0ef7936be43001ada99c5875ab.tar.gz
guix-6cd019638742fe0ef7936be43001ada99c5875ab.tar.bz2
guix-6cd019638742fe0ef7936be43001ada99c5875ab.tar.xz
gnu: Add python-flit-scm.
* gnu/packages/python-build.scm (python-flit-scm): New variable.
-rw-r--r--gnu/packages/python-build.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index afccfabb2c..e7023aca0c 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -405,6 +405,55 @@ specified by PEP 517, @code{flit_core.buildapi}.")
405 (modify-inputs (package-propagated-inputs python-flit-core-bootstrap) 405 (modify-inputs (package-propagated-inputs python-flit-core-bootstrap)
406 (replace "python-toml" python-tomli))))) 406 (replace "python-toml" python-tomli)))))
407 407
408(define-public python-flit-scm
409 (package
410 (name "python-flit-scm")
411 (version "1.6.2")
412 (source (origin
413 (method url-fetch)
414 (uri (pypi-uri "flit_scm" version))
415 (sha256
416 (base32
417 "0p3lj2g1643m2dm14kihvfb6gn6jviglhm3dzdpn2c8zpqs17svg"))))
418 (build-system python-build-system)
419 (arguments
420 (list
421 #:tests? #f ;no test suite
422 #:phases
423 #~(modify-phases %standard-phases
424 (add-after 'unpack 'relax-setuptools-scm-version
425 (lambda _
426 (substitute* "pyproject.toml"
427 (("setuptools_scm~=6.4")
428 "setuptools_scm>=6.3"))))
429 ;; XXX: PEP 517 manual build/install procedures copied from
430 ;; python-isort.
431 (replace 'build
432 (lambda _
433 ;; ZIP does not support timestamps before 1980.
434 (setenv "SOURCE_DATE_EPOCH" "315532800")
435 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
436 (replace 'install
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((whl (car (find-files "dist" "\\.whl$"))))
439 (invoke "pip" "--no-cache-dir" "--no-input"
440 "install" "--no-deps" "--prefix" #$output whl)))))))
441 (native-inputs
442 (list python-pypa-build
443 python-flit-core
444 python-setuptools-scm
445 python-tomli))
446 (propagated-inputs
447 (list python-flit-core
448 python-setuptools-scm
449 python-tomli))
450 (home-page "https://gitlab.com/WillDaSilva/flit_scm")
451 (synopsis "PEP 518 build backend combining flit_core and setuptools_scm")
452 (description "This package provides a PEP 518 build backend that uses
453@code{setuptools_scm} to generate a version file from your version control
454system, then @code{flit_core} to build the package.")
455 (license license:expat)))
456
408(define-public python-setuptools-scm 457(define-public python-setuptools-scm
409 (package 458 (package
410 (name "python-setuptools-scm") 459 (name "python-setuptools-scm")