librelist archives

« back to archive

need spec for Bento inside wheel binary packages

need spec for Bento inside wheel binary packages

From:
Daniel Holth
Date:
2012-10-12 @ 13:45
I am working on the wheel binary packaging format:
http://www.python.org/dev/peps/pep-0427/. It allows you to install a
package without having to install the build system so it should be
useful for systems like Bento. Wheels do not include setup.py and will
be "pip install"-able without having to do any kind of setuptools
emulation.

Bento will not be available during a wheel install. To be compatible
with Bento, the wheel specification will have to include writing
installation paths to a config.py on request and may have to be able
to define .data/ directories that are not in sysconfig.get_paths(). If
someone from the Bento community writes the spec, I would be willing
to add it to wheel.

>>> pprint.pprint(sysconfig.get_paths())
{'data': '/usr/local',
 'include': '/usr/local/include/python2.7',
 'platinclude': '/usr/local/include/python2.7',
 'platlib': '/usr/local/lib/python2.7/dist-packages',
 'platstdlib': '/usr/lib/python2.7',
 'purelib': '/usr/local/lib/python2.7/dist-packages',
 'scripts': '/usr/local/bin',
 'stdlib': '/usr/lib/python2.7'}

Thanks,

Daniel

Re: [bento] need spec for Bento inside wheel binary packages

From:
David Cournapeau
Date:
2012-10-20 @ 19:48
On Fri, Oct 12, 2012 at 3:45 PM, Daniel Holth <dholth@gmail.com> wrote:
> I am working on the wheel binary packaging format:
> http://www.python.org/dev/peps/pep-0427/. It allows you to install a
> package without having to install the build system so it should be
> useful for systems like Bento. Wheels do not include setup.py and will
> be "pip install"-able without having to do any kind of setuptools
> emulation.
>
> Bento will not be available during a wheel install. To be compatible
> with Bento, the wheel specification will have to include writing
> installation paths to a config.py on request and may have to be able
> to define .data/ directories that are not in sysconfig.get_paths(). If
> someone from the Bento community writes the spec, I would be willing
> to add it to wheel.

There is no spec yet on that aspect. I am reluctant to make one
because I have not dealt with relocatable installs and other similar
features yet.

Do you actually need a spec, though ? What are the use cases to know
data paths ?

David

Re: [bento] need spec for Bento inside wheel binary packages

From:
Daniel Holth
Date:
2012-10-20 @ 20:15
On Sat, Oct 20, 2012 at 3:48 PM, David Cournapeau <cournape@gmail.com> wrote:
> On Fri, Oct 12, 2012 at 3:45 PM, Daniel Holth <dholth@gmail.com> wrote:
>> I am working on the wheel binary packaging format:
>> http://www.python.org/dev/peps/pep-0427/. It allows you to install a
>> package without having to install the build system so it should be
>> useful for systems like Bento. Wheels do not include setup.py and will
>> be "pip install"-able without having to do any kind of setuptools
>> emulation.
>>
>> Bento will not be available during a wheel install. To be compatible
>> with Bento, the wheel specification will have to include writing
>> installation paths to a config.py on request and may have to be able
>> to define .data/ directories that are not in sysconfig.get_paths(). If
>> someone from the Bento community writes the spec, I would be willing
>> to add it to wheel.
>
> There is no spec yet on that aspect. I am reluctant to make one
> because I have not dealt with relocatable installs and other similar
> features yet.
>
> Do you actually need a spec, though ? What are the use cases to know
> data paths ?

I noticed you have these paths in Bento:

http://bento.readthedocs.org/en/latest/reference/bento_format.html#available-path-variables

prefix, eprefix, bindir, ...

For example wheel could allow these in addition to the distutils paths
(scripts, purelib, platlib, data, headers ...) as keys in the "install
paths" dictionary. A directory "package-1.0.data/mandir/..." would get
copied onto the system's mandir during install.

A more complicated spec would include some subset of the custom_name =
$py_version/$dist_name/$other_variable functionality, where you would
be able to define destination paths based on some set of available
variable names.

Although, the data directory in distutils maps to just / or the root
of the virtualenv.

distutils2 currently writes each file's initial location and final
location in a .dist-info/RESOURCES so you can map the expected name to
the actual install name. I don't think it is healthy to allow every
single file to be installed on a different path, so I like the ability
to relocate just categories of files.

You might not keep the __config.py with

PREFIX = /somepath
EPREFIX = /anotherpath

?

Re: [bento] need spec for Bento inside wheel binary packages

From:
David Cournapeau
Date:
2012-10-22 @ 11:19
On Sat, Oct 20, 2012 at 10:15 PM, Daniel Holth <dholth@gmail.com> wrote:
> On Sat, Oct 20, 2012 at 3:48 PM, David Cournapeau <cournape@gmail.com> wrote:
>> On Fri, Oct 12, 2012 at 3:45 PM, Daniel Holth <dholth@gmail.com> wrote:
>>> I am working on the wheel binary packaging format:
>>> http://www.python.org/dev/peps/pep-0427/. It allows you to install a
>>> package without having to install the build system so it should be
>>> useful for systems like Bento. Wheels do not include setup.py and will
>>> be "pip install"-able without having to do any kind of setuptools
>>> emulation.
>>>
>>> Bento will not be available during a wheel install. To be compatible
>>> with Bento, the wheel specification will have to include writing
>>> installation paths to a config.py on request and may have to be able
>>> to define .data/ directories that are not in sysconfig.get_paths(). If
>>> someone from the Bento community writes the spec, I would be willing
>>> to add it to wheel.
>>
>> There is no spec yet on that aspect. I am reluctant to make one
>> because I have not dealt with relocatable installs and other similar
>> features yet.
>>
>> Do you actually need a spec, though ? What are the use cases to know
>> data paths ?
>
> I noticed you have these paths in Bento:
> 
http://bento.readthedocs.org/en/latest/reference/bento_format.html#available-path-variables
>
> prefix, eprefix, bindir, ...

All the 'standard' paths are the ones from autoconf. But people can
define their own additional paths as well.

>
> For example wheel could allow these in addition to the distutils paths
> (scripts, purelib, platlib, data, headers ...) as keys in the "install
> paths" dictionary. A directory "package-1.0.data/mandir/..." would get
> copied onto the system's mandir during install.
>
> A more complicated spec would include some subset of the custom_name =
> $py_version/$dist_name/$other_variable functionality, where you would
> be able to define destination paths based on some set of available
> variable names.
>
> Although, the data directory in distutils maps to just / or the root
> of the virtualenv.
>
> distutils2 currently writes each file's initial location and final
> location in a .dist-info/RESOURCES so you can map the expected name to
> the actual install name. I don't think it is healthy to allow every
> single file to be installed on a different path, so I like the ability
> to relocate just categories of files.
>
> You might not keep the __config.py with
>
> PREFIX = /somepath
> EPREFIX = /anotherpath

I will most likely keep the principle, but how this works is an
implementation detail at this point.

David