guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 09/16] gnu: Add python-entrypoints.


From: Hartmut Goebel
Subject: Re: [PATCH 09/16] gnu: Add python-entrypoints.
Date: Wed, 2 Nov 2016 09:23:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Am 01.11.2016 um 13:20 schrieb Ricardo Wurmus:
> +       (modify-phases %standard-phases
> +         (delete 'build)
> +         (replace 'install
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (python-version ((@@ (guix build python-build-system)
> +                                         get-python-version)
> +                                     (assoc-ref inputs "python")))
> +                    (target (string-append out "/lib/python" python-version
> +                                           "/site-packages/")))
> +               (mkdir-p target)
> +               (call-with-output-file (string-append target 
> "entrypoints.egg-info")
> +                 (lambda (port)
> +                   (format port "\
> +Metadata-Version: 1.1
> +Name: entrypoints
> +Version: ~a
> +Summary: Discover and load entry points from installed packages
> +Author: Thomas Kluyver
> +Author-email: address@hidden
> +Classifier: License :: OSI Approved :: MIT License
> +" ,version)))
> +               (install-file "entrypoints.py" target)
> +               #t))))))

Instread of this I recommend adding a minimal setup.py and let the
build-system do the job. This would be more future proof.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | address@hidden               |
| www.crazy-compilers.com | compilers which you thought are impossible |





reply via email to

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