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

* Re: Inherit inputs when unnecessary in these python2 packages?
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-02-14  3:19 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Sat, Feb 13, 2016 at 06:10:17PM -0800, Christopher Allan Webber wrote:
> I'm doing a lot of packaging for Python packages right now.  A lot of
> the code looks like this:

[...]

> > (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?

Take a look at python2-wheel, as in 8ad4ae204f.

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

* Re: Inherit inputs when unnecessary in these python2 packages?
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2016-02-14 14:48 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Sat, Feb 13, 2016 at 06:10:17PM -0800, Christopher Allan Webber wrote:
> >     (native-inputs
> >      `(("python-setuptools-scm" ,python-setuptools-scm)))
> > 
> > (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.

This looks suspicious; should the python2-setuptools not also be a
native input? Then accidentally the problem you mention would also
disappear.

Andreas

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

* Re: Inherit inputs when unnecessary in these python2 packages?
  2016-02-14 14:48 ` Andreas Enge
@ 2016-02-14 19:09   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-02-14 19:09 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

On Sun, Feb 14, 2016 at 03:48:32PM +0100, Andreas Enge wrote:
> On Sat, Feb 13, 2016 at 06:10:17PM -0800, Christopher Allan Webber wrote:
> > >     (native-inputs
> > >      `(("python-setuptools-scm" ,python-setuptools-scm)))
> > > 
> > > (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.
> 
> This looks suspicious; should the python2-setuptools not also be a
> native input? Then accidentally the problem you mention would also
> disappear.

Yes, I pointed this out to Christopher after missing it in my review. It
should be fixed at some point.

^ 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).