After this commit, when both modules are imported:
- if pyproject is imported before, the warning is 'pypi-uri' is
deprecated, use '(@ (guix build-system pyproject) pypi-uri)' instead
- if python is imported before, the warning is `pypi-uri' imported from
both (guix build-system python) and (guix build-system pyproject)
This seems convenient enough to warn for deprecation in the short term,
while avoiding any breaking changes.
* guix/build-system/pyproject.scm (pypi-uri): Move the procedure from
(guix build-system python) here.
* guix/build-system/python (pypi-uri): Drop definition, import it
from (guix build-system pyproject) and deprecate it.
* gnu/packages/openldap.scm: Reorder modules to get the right warning.
* gnu/packages/pypy.scm: Likewise.
* gnu/packages/*.scm : Drop module (guix build-system python).
* tests/import/pypi.scm: Likewise.
Merges: https://codeberg.org/guix/guix/pulls/7448
Change-Id: Ib42f53bc545052eb7918a25afe9db6d5fc2cb834
Reviewed-by: Nguyễn Gia Phong <cnx@loang.net>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build/pyproject-build-system.scm (set-version): Ensure source
is not #f before using it.
* tests/builders.scm
(make-python-dummy)[build-system]: Switch to pyproject-build-system.
[native-inputs]: Add python-setuptools.
(python-dummy-no-setuptools): Drop it.
(check-build-success, check-build-failure): Refresh tests.
(check-build-failure): Drop python-dummy-no-setuptools.
Change-Id: I892b45c34b506ff27634e2ef706009dc81e831ec
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build/pyproject-build-system.scm (install):
[install-path, fix-scripts, distribution-name]: New helper procedures.
[expand-data-directory]: Refactor and build upon install-path to
handle purelib and platlib on top of just scripts and data.
Change-Id: I64f5453676e6881ae1cbce3170ed854f7035982a
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build/pyproject-build-system.scm
(keywords->alist, guile->python-keywords): Add procedures.
(check): Convert keyword alist before writing it.
* guix/build-system/pyproject.scm (%default-pytest-guix-options):
Add some python kwargs in a guile format.
* gnu/packages/aux-files/python/pytest_guix.py
(pytest_addoption): Handle python kwargs when some are provided.
Change-Id: Ie35e9b300acda830f35b6b754e8ccc07ad730faa
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build/pyproject-build-system.scm (check):
Pass pytest-guix-options to python through a hidden json file.
* guix/build-system/pyproject.scm
(%default-pytest-guix-options): Add variable.
(pyproject-build): Use it.
* gnu/packages/aux-files/python/pytest_guix.py:
Import pytest-guix-options from guile through a hidden json file.
Change-Id: Ice2ea72452c335b900bc354a04bd9657dc03d7d4
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit includes squashed changes from
https://codeberg.org/guix/guix/pulls/7220 and
https://codeberg.org/guix/guix/pulls/7338.
* gnu/packages/aux-files/python/pytest_guix.py: New file.
* Makefile.am: Record it.
* guix/build/pyproject-build-system.scm (check): Preload pytest_guix
plugin when available.
* guix/build-system/pyproject.scm (default-pytest-guix-plugin): New
package, generated from pytest_guix.py.
(lower): Add python-pytest-guix argument, and inject it if
python-pytest is in the native-inputs.
Change-Id: I13263b461e9962aad340347657b9c9685db63927
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
hatch-vcs also uses the SETUPTOOLS_SCM_PRETEND_VERSION
environment variable, while poetry-dynamic-versioning uses
POETRY_DYNAMIC_VERSIONING_BYPASS. versioneer, on the other hand,
read from the Python package's ._version.get_versions().
The version scheme for Python packaging is not the same as
(nor compatible with) that of semantic version,
hence stop mentioning the latter in the docstring and comments.
When no relevant Python build backend is detected, regardless
if the source has been obtained from a VCS checkout, it is confusing
to mention any of the backends as unnecessary as a native input.
Moreover, unlike the hatch-vcs, poetry-dynamic-versioning
and setuptools-scm that works transparently with the build backend,
pbr and versioneer are required for building.
The output of the set-version phase has been adjusted accordingly.
* guix/build/pyproject-build-system.scm (set-version):
Add support for python-hatch-vcs. Clarify docstring.
Log the explicit reason for noop cases.
References: https://github.com/ofek/hatch-vcs#version-source-environment-variables
References: https://github.com/mtkennerly/poetry-dynamic-versioning#environment-variables
References: https://github.com/python-versioneer/python-versioneer
References: https://docs.openstack.org/pbr/latest/user/packagers.html#versioning
References: https://packaging.python.org/en/latest/specifications/version-specifiers
Change-Id: I8f499856cb6b026539c96fb828e450a40ba10b79
Reviewed-by: Nicolas Graves <ngraves@ngraves.fr>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/scripts/gc.scm (%options): Error out when a non-root user tries
to vacuum the database.
Change-Id: Iee7d626c43980640aa91a3ceeb95675016932c55
Signed-off-by: jgart <jgart@dismail.de>
* guix/build/texlive-build-system.scm (generate-font-metrics): Cater for
texlive-metafont both as a native input and as an argument from texlive-local-tree.
Change-Id: I32dd86d49ebcb49efd2a253c0491926e0333d3f4
Fixes: https://issues.guix.gnu.org/73295
* guix/profiles.scm (texlive-font-maps): Do not use mktexlsr command.
Change-Id: I91710740d7f467a236cc82ceca560b0f51a4094d
The tested AppImages were not actually relocatable and would rely on items
being available on the environment’s store (apart from glibc).
* guix/scripts/pack.scm (wrapped-manifest): New function.
(guix-pack): Extract relocatable manifest to wrapped-manifest.
* tests/pack.scm: Use relocatable profiles in AppImage tests.
Fixes: <https://issues.guix.gnu.org/76850>
Change-Id: Ib3123054913fce903d215dc0629d806e9fceebc7
Reported-by: Reepca Russelstein <reepca@russelstein.xyz>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
The runtime-fuse3 binary was renamed to runtime.
* gnu/packages/appimage.scm (appimage-type2-runtime):
Update to continuous-1.caf24f9.
* guix/scripts/pack.scm (self-contained-appimage):
[runtime-path]: Use new runtime name.
Change-Id: Ibbb1fcb6ca914764c37addb62c8234b49cc93bd5
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Both (guix channel) and (guix git-authenticate) use similar procedures.
To refactor the one in (guix git-authenticate), move the procedure
to (guix openpgp).
* guix/channels.scm: Replace autoloaded import
openpgp-public-key-fingerprint with openpgp-fingerprint->bytevector.
(openpgp-fingerprint->bytevector):
Move function definition from here...
* guix/openpgp.scm (openpgp-fingerprint->bytevector): ...to here.
* guix/git-authenticate.scm (read-authorizations):
Use openpgp-fingerprint->bytevector.
* guix/scripts/git/authenticate.scm:
Avoid using the (guix channels) module.
* tests/git-authenticate.scm : Likewise.
Change-Id: Ifd20588fcfaab601990098bd8575ee985e87394a
Reviewed-by: Danny Milosavljevic <dannym@friendly-machines.com>
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
* guix/git-authenticate.scm (commit-signing-key):
Use srfi-71 instead of srfi-11 in case of multiple values.
Change-Id: I6a35880bc97385b4424b7218a757c226e044555c
Reviewed-by: Danny Milosavljevic <dannym@friendly-machines.com>
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Fixes a regression introduced in ad8d386168,
where a call to ‘u8-list->bytevector’ was introduced without the
corresponding (rnrs bytevectors) import.
* guix/svn-download.scm (svn-fetch-builder): In gexp, add missing (rnrs
bytevectors) import.
Change-Id: I38a29d94a4645ff24ef44a84196a6040945776b8
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7674
Previously ‘--save-provenance’ would be silently ignored for ‘guix system
image’.
* guix/scripts/system.scm (image-with-provenance): New procedure.
(process-action): In ‘transform’, add case for ‘image?’, and emit a warning in
the default case.
Change-Id: I5020a4b3dacbe7a0820a3c4779b7d86a8133bd60
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7485
Previously we would accept the #:test-directory argument but ignore the value.
* guix/build-system/r.scm (r-build): Set default value for TEST-DIRECTORY
field.
* guix/build/r-build-system.scm (patch-tests): Use value of TEST-DIRECTORY
argument.
Change-Id: If435577bc0e90ede360ee281ee5bc27fa1b0b3f0
With SYSTEM* we see a file descriptor leak. See the discussion at
<https://codeberg.org/guix-science/guix-cran-scripts/issues/5>. There is no
such leak when using SPAWN.
* guix/import/cran.scm (fetch-description-from-tarball, source->dependencies):
Use SPAWN instead of SYSTEM*.
Change-Id: Idb13f775317e6d5d426f8675e169f0ebbe246fe2
* guix/build/cargo-build-system.scm (prepare-rust-crates): New phase.
(unpack-rust-crates): Move old functionality to prepare-rust-crates.
Take unpacking functionality from the configure phase.
(%standard-phases): Add prepare-rust-crates between unpack and
unpack-rust-crates.
Change-Id: Ibc61a6d1de1eab269b021f977440aa3c631ffcf6
Signed-off-by: John Kehayias <john@guixotic.coop>
This is a followup to a7c8e68dc5: this commit
introduced a new binding in the body of field values, which could silently
shadow outer bindings. This new warning catches potentially unwanted
shadowing.
* guix/records.scm (make-syntactic-constructor)[check-shadowing]: New
procedure.
[wrap-field-value]: Use it.
* tests/records.scm ("define-record-type* & inherited value shadowing"): New
test.
Change-Id: I81ad14cf10da7213e9f8db987c8b0bd4c41acba2
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7424
Previously version lists containing zeroes would be rejected; furthermore, #f
would be returned even though callers expect a string:
$ guix refresh emacs-counsel
guix refresh: Package version for counsel contains non numeric part.
Backtrace:
[…]
In guix/utils.scm:
925:32 5 (_ #f "0.15.1")
In unknown file:
4 (string->pointer #f #<undefined>)
[…]
guix/ui.scm:920:18: In procedure string->pointer: Wrong type argument in position 1 (expecting string): #f
* guix/import/elpa.scm (elpa-version->string): Accept zeroes in
‘elpa-version’. Raise an error instead of returning #f on failure. Clarify
error messages.
Change-Id: I1ab1d6892b434747d91e9090bb5f2f3c93f1ee92
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7484
--list-updaters loops through all packages and all updaters to see whether they
match. The gnu-ftp updater used to use official-gnu-packages to fetch a list of
packages from web.cvs.savannah.gnu.org. official-gnu-packages only caches the
result if it succeeds; but does not cache upon a timout or 5xx status.
official-gnu-packages times out after a minute and is called for all 30k+
packages. refresh --list-updaters could therefore take 30000 minutes. Now
--list-updaters uses official-gnu-packages* (from lint.scm) that memoizes the
result also on failure, thereby limiting the time to 1 minute.
* guix/gnu-maintenance.scm: Add official-gnu-packages* from guix/lint.scm.
Call official-gnu-packages* from gnu-package?
* guix/lint.scm: Move official-gnu-packages* to guix/gnu-maintenance.scm
Change-Id: I5e2e094bfb1042b03db47e119ced0e94b49b417c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4949
* guix/build/renpy-build-system.scm (enable-bytecode-determinism): New
variable.
(%standard-phases): Replace python:enable-bytecode-determinism with
own variant.
* guix/build-system/renpy.scm (%renpy-build-system-modules):
Drop (guix build python-build-system).
Fixes: guix/guix#7426 (“Migrate `renpy-build-system' to pyproject”)
Moving these definitions to a separate module is necessary to avoid circular
references at the top-level among package modules.
* gnu/packages/rocm.scm (%default-amd-gpu-targets, current-amd-gpu-targets)
(current-amd-gpu-targets-string): Move to…
* guix/amd-gpu.scm: … here. New file.
* Makefile.am (MODULES): Add it.
Merges guix/guix!7251
Change-Id: I60496fb4d81ea0445ec176add7afc388f6790bd3
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Like gnu-build, this is important as otherwise the builder script can end up
using grafted outputs, which is wrong as grafting should happen after
building.
This addresses an issue with the go-github-com-quic-go-qpack package where the
builder used the grafted specification-qifs, rather than the normal
derivation/output.
* guix/build-system/go.scm (go-build): Call gexp->derivation with #:graft? #f.
Fixes: guix/guix#6820
Change-Id: I7e02ecc3b16d112cc00140653e0528f5d6681bac
* guix/ui.scm (show-manifest-transaction): Include old version in message.
Change-Id: I897ec2d52a1cd4d030929a1adc3458f29c9ae4d4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7133
Implement caching to speed up computation through memoization.
* guix/derivations.scm (map-derivation): Turn ‘loop’ into an ‘mlambdaq’.
Change-Id: I186e2a62f6655e3b0738dd6e0f628faccd8b855e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The 'map-derivation' procedure was trying to process directories as files.
When a derivation had a 'module import' directory as input, it threw an
exception since it tried to open it as a file.
* guix/derivations.scm (map-derivation): In ‘sources’, add
‘file-is-directory?’ case.
* tests/derivations.scm ("map-derivation, modules"): New test.
Fixes: https://issues.guix.gnu.org/71941
Change-Id: I9b766f9aaa03ea9307f73e8abb36bc347af4b5e6
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build-system/gnu.scm (package-with-explicit-inputs/deprecated): In
the field value bodies of inherited packages, use the field name to refer to
the inherited value.
(package-with-explicit-inputs*)[add-explicit-inputs]: Likewise.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
(dist-package): Likewise.
(package-with-restricted-references): Likewise.
Change-Id: I62a95563cbdd48170a674b4995585c8778808b8c
* guix/records.scm (make-syntactic-constructor)[field-index]: New procedure.
[wrap-field-value]: Add optional argument ‘parent’. When it is true, bind F
to the inherited field value.
[field-bindings/inheritance]: New procedure.
Use it.
* tests/records.scm ("define-record-type* & thunked & no inherited value")
("define-record-type* & thunked & inherited value")
("define-record-type* & thunked & inherited value & this-record"): New tests.
* doc/guix.texi (Defining Package Variants): Update ‘modify-inputs’ example to
refer to ‘inputs’.
(Writing Manifests): Likewise.
* doc/guix-cookbook.texi (Package Variants): Likewise for
‘substitute-keyword-arguments’.
Fixes: https://issues.guix.gnu.org/50335
Change-Id: If4e18155ce203637ff9e116ee8098f8997bfebe2
With the next commit, ‘inputs’ is bound within the body of the ‘inputs’ field,
which would shadow the ‘inputs’ parameter of ‘package-with-explicit-inputs*’.
* guix/build-system/gnu.scm (package-with-explicit-inputs*): Rename ‘inputs’
parameter to ‘explicit-inputs’ to avoid name class in ‘add-explicit-inputs’.
Change-Id: I5aa70504cc6ffc856728c6e1a715ef68d9ebd7d9
elpa-version->string construct the version (needed later to construct the full
package name to fetch the archive...) from the version numbers given as a list
from archive-contents. This list representation is documented in emacs's
version-to-list and version-regexp-alist docstrings.
In these list, A negative integer specify a non-numeric part of a
version. Different non-numeric may lead to the same negative
integer (e.g. 1.2.CVS, 1.2cvs, 1.2_Cvs, ...).
If there is a negative integer, we need to gather more information because the
list version present in archive-contents is not enough to reconstruct the
archive address.
We parse the ATOM feed at elpa.gnu.org/devel/PACKAGE.xml
Tested on all packages. only loc-changes does not have an ATOM feed.
* guix/import/elpa.scm (elpa-version->string): New repo and name arguments,
use version-from-elpa-devel-feed if needed.
(fetch-elpa-package): Upgrade elpa-version->string call.
(latest-release): Same.
(version-from-elpa-devel-feed): New function.
Change-Id: Ic446d81593d9e6422c20a1ac427438e540e963b0
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Simply switch to the style that is used in other build-systems.
* guix/build-system/clojure.scm
(%default-clojure): Move from here…
(default-clojure): …to here.
(%default-jdk): Move from here…
(default-jdk): …to here.
(%default-zip): Move from here…
(default-zip): …to here.
Change-Id: Ic31ba1365a6a80e5fa319096bf833d9cf684b3ac
Signed-off-by: Julien Lepiller <julien@lepiller.eu>