unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Inherit inputs when unnecessary in these python2 packages?
@ 2016-02-14  2:10 Christopher Allan Webber
  2016-02-14  3:19 ` Leo Famulari
  2016-02-14 14:48 ` Andreas Enge
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Allan Webber @ 2016-02-14  2:10 UTC (permalink / raw)
  To: guix-devel

I'm doing a lot of packaging for Python packages right now.  A lot of
the code looks like this:

> (define-public python-execnet
>   (package
>     (name "python-execnet")
>     (version "1.4.1")
>     (source (origin
>              (method url-fetch)
>              (uri (pypi-uri "execnet" version))
>              (sha256
>               (base32
>                "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
>     (build-system python-build-system)
>     (native-inputs
>      `(("python-setuptools-scm" ,python-setuptools-scm)))
>     (propagated-inputs
>      `(("python-apipkg" ,python-apipkg)))
>     (synopsis "Rapid multi-Python deployment")
>     (description "Execnet provides a share-nothing model with
> channel-send/receive communication for distributing execution across many
> Python interpreters across version, platform and network barriers.  It has a
> minimal and fast API targetting the following uses:
> @enumerate
> @item distribute tasks to (many) local or remote CPUs
> @item write and deploy hybrid multi-process applications
> @item write scripts to administer multiple environments
> @end enumerate")
>     (home-page "http://codespeak.net/execnet/")
>     (license license:expat)
>     (properties `((python2-variant . ,(delay python2-execnet))))))
> 
> (define-public python2-execnet
>   (package
>     (inherit (package-with-python2
>               (strip-python2-variant python-execnet)))
>     (inputs
>      `(("python2-setuptools" ,python2-setuptools)))))

As you can see, there is no inputs on python-execnet, so it's not
necessary to include the inputs.  However, if (inputs) were added in the
future, this could lead to a developer mistakenly forgetting to change
the python2 variant.

What's the better approach?

 - Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-14 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14  2:10 Inherit inputs when unnecessary in these python2 packages? Christopher Allan Webber
2016-02-14  3:19 ` Leo Famulari
2016-02-14 14:48 ` Andreas Enge
2016-02-14 19:09   ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).