help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistencies in Package Transformation?


From: Julien Lepiller
Subject: Re: Inconsistencies in Package Transformation?
Date: Tue, 18 May 2021 17:30:24 -0400
User-agent: K-9 Mail for Android

I think this is because the syntax works by first transforming the name to a 
package variable, so when you replace python-pandas, it only replaces the 
python-pandas guix install would install, not your custom version. Does it make 
sense?

Le 18 mai 2021 17:01:49 GMT-04:00, Phil Beadling <phil@beadling.co.uk> a écrit :
>Hi all,
>
>I've read through this link:
>https://guix.gnu.org/manual/en/html_node/Package-Transformation-Options.html
>
>But I seem to get unexpected outcomes in some examples - see below.
>
>Any advice or confirmation that this is a bug or misuse by me?
>
>Thanks,
>Phil.
>
>A simple case of package transformation without any dependencies seems
>to
>work fine - for example, let's upgrade pandas to v1.1.5:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>*$ guix package -i python-pandas python -p ~/profiles/pandas-1.1.5
>--with-git-url=python-pandas=https://github.com/pandas-dev/pandas.git
><https://github.com/pandas-dev/pandas.git>
>--with-commit=python-pandas=v1.1.5 --without-tests=python-pandasThe
>following packages will be installed:   python        3.8.2  
>python-pandas
>1.1.5updating checkout of 'https://github.com/pandas-dev/pandas.git'.
><https://github.com/pandas-dev/pandas.git'.>..retrieved commit
>af3e67970ff8e9e3eccfef54c8de96f850e36912The following derivation will
>be
>built:  
>/gnu/store/cd045q1l75wx59d62f1b8sb6p92yjf4d-profile.drvbuilding CA
>certificate bundle...listing Emacs sub-directories...building fonts
>directory...building directory of Info manuals...building database for
>manual pages...building profile with 2 packages...hint: Consider
>setting
>the necessary environment variables by running:
> GUIX_PROFILE="/home/phil/profiles/pandas-1.1.5"     .
>"$GUIX_PROFILE/etc/profile"Alternately, see `guix package
>--search-paths -p
>"/home/phil/profiles/pandas-1.1.5"'.$
>GUIX_PROFILE="/home/phil/profiles/pandas-1.1.5"$ .
>"$GUIX_PROFILE/etc/profile"$ python3Python 3.8.2 (default, Jan  1 1970,
>00:00:01)[GCC 7.5.0] on linuxType "help", "copyright", "credits" or
>"license" for more information.>>> import pandas as pd>>>
>pd.__version__'0+unknown'>>>*
>
>The right commit is taken from github, and after the build we use the
>profile to access our new version of pandas (the 0+unknown version I
>think
>is caused by building from git).
>
>
>Next, I try exactly the same transformation, but I want to instead
>build
>one of my own applications which has python-pandas as propagated input.
> My
>understanding from the docs is this should work find as a deep
>transformation should occur?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>*$ guix package -i foo python -p ~/profiles/foo-pandas-1.1.5
>--with-git-url=python-pandas=https://github.com/pandas-dev/pandas.git
><https://github.com/pandas-dev/pandas.git>
>--with-commit=python-pandas=v1.1.5 --without-tests=python-pandas
>--without-tests=python-dask --without-tests=fooThe following packages
>will
>be installed:   python 3.8.2   foo 3.196.0updating checkout of
>'ssh://git@bitbucket:7999/foo/foo.git'...retrieved commit
>a723e52bec22ca36bbfda62f34a1f46e0065b7eaupdating checkout of
>'https://github.com/pandas-dev/pandas.git'.
><https://github.com/pandas-dev/pandas.git'.>..retrieved commit
>af3e67970ff8e9e3eccfef54c8de96f850e36912hint: Consider setting the
>necessary environment variables by running:
> GUIX_PROFILE="/home/phil/profiles/simm-pandas-1.1.5"     .
>"$GUIX_PROFILE/etc/profile"Alternately, see `guix package
>--search-paths -p
>"/home/phil/profiles/simm-pandas-1.1.5"'.$
>GUIX_PROFILE="/home/phil/profiles/simm-pandas-1.1.5"$ .
>"$GUIX_PROFILE/etc/profile"$ python3Python 3.8.2 (default, Jan  1 1970,
>00:00:01)[GCC 7.5.0] on linuxType "help", "copyright", "credits" or
>"license" for more information.>>> import pandas as pd>>>
>pd.__version__'1.1.2'>>>*
>
>Everything looks to be going to plan, but when I import pandas using
>the
>new profile I get version *1.1.2* - which is my standard untransformed
>python-pandas package - no replacement has taken place, despite the
>process
>reporting the correct location and commit id for the pandas checkout.
>
>
>This either looks like a) a bug, or b) I've misunderstood the scope of
>the
>transformation syntax.
>
>
>One last detail - my own definiton of python-pandas v1.1.2 inherits
>from
>the gnu package in Guix.  Whilst I inherit the name python-pandas the
>actual package is called python-pandas-foo, and it is referenced in
>foo's
>package's propagated inputs like this:
>*("python-pandas" ,python-pandas-foo)*
>
>Package definition snippet:
>
>
>
>
>
>
>
>
>
>
>*(define-public python-pandas-foo  (package    (inherit python-pandas)
>(version "1.1.2")    (source     (origin       (method url-fetch)
> (uri (pypi-uri "pandas" version))       (sha256        (base32
>"0i0lbp26kzbq1qa4rv2s2r42m9d95svjrfflmi01plygla3zskxn")))) .... and so
>on*
>
>I don't think this last detail should matter, but I include is as the
>only
>other significant detail that may differ from other systems.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]