Re: [Distutils] Distribution format for Python3 libraries

2013-11-19 Thread PJ Eby
On Tue, Nov 19, 2013 at 5:24 PM, Nick Coghlan  wrote:
> Perhaps it would be worth breaking the environment markers out as their own
> PEP?

As I said back then, I think *everything* in PEP 426 is worth breaking
out into its own PEP.  ;-)

Less jokingly, I think that the scope of PEP 426 includes many things
that have different (if overlapping) audiences, and splitting it into
smaller pieces will help those audiences concentrate on the bits
relevant to them.

The audience for markers is a subset of the audience for requirement
specs, which is a subset of the audience for version syntax.  Lots of
other subtopics are of interest mainly to build tool and distro
makers, so there's little point in making everybody read everything.
(Also, a lot of these smaller things are (hopefully) easier to reach
consensus on, at which point the PEPs are settled and allow moving
discussion on to the more open issues.)

So, yes, good idea to break out environment markers.  ;-)
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-19 Thread Nick Coghlan
On 20 Nov 2013 03:33, "PJ Eby"  wrote:
>
> On Tue, Nov 19, 2013 at 6:22 AM, Nick Coghlan  wrote:
> > On 19 November 2013 15:09, PJ Eby  wrote:
> >> On Sun, Nov 17, 2013 at 8:44 AM, Nick Coghlan 
wrote:
> >>> More accurately, it appears setuptools *does* support PEP 345 style
> >>> environment markers, it just isn't documented at
> >>>
http://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies
> >>> *sigh*
> >>
> >> That's because it's technically an experimental feature I hacked into
> >> 0.6c12 development shortly before the distribute merge in order to
> >> handle setuptools' own requirements for SSL, so that setuptools could
> >> ship just one platform-independent egg and still have
> >> platform-specific dependencies.  ;-)
> >>
> >> I think Jason et al may have since upgraded it to a supported feature,
> >> but last I looked I think there may have still been issues with Jython
> >> support for the feature.
> >>
> >> So, the lack of documentation may still be a feature rather than a bug
ATM.  ;-)
> >
> > A fair point :)
> >
> > Regardless, it highlights the fact I need to ensure PEP 426 preserves
> > the legacy spellings for the markers that have dots in their names in
> > metadata 1.2 (https://bitbucket.org/pypa/pypi-metadata-formats/issue/12
).
>
> Eh?  I implemented PEP 426 (draft-at-the-time) markers in the feature
> I mentioned above.
>
> Hm.  Actually, looking over it now, I see the real reason it's
> experimental: it was implemented based on consensus-in-progress for
> PEP 426, so not a finalized PEP.  It also sort-of handles PEP 345.
> And the Jython fallback, IIRC, was maybe only doing PEP 345.  (And
> setuptools itself only needed the Python version and platform name.)
>
> So it's actually a bit of a mess -- which is why it wasn't documented,
> in order to avoid people forcing the new PEP's hand with another de
> facto standard.  I just figured it would get us most of the way there
> and when the PEP dust settled, the tests and code could be tweaked a
> bit to match, then documented with reference to the PEP.

Ah, that definitely makes sense - and then I went and postponed further
work on metadata 2.0 until after the Python 3.4 feature freeze once I
realised how far we could get with metadata 1.1 + the setuptools metadata
files.

So it turns out my *first* answer to the IPython folks was the most
accurate: technically, we need PEP 426 finalised before the static metadata
can handle their requirements.

Perhaps it would be worth breaking the environment markers out as their own
PEP?

Cheers,
Nick.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-19 Thread PJ Eby
On Tue, Nov 19, 2013 at 6:22 AM, Nick Coghlan  wrote:
> On 19 November 2013 15:09, PJ Eby  wrote:
>> On Sun, Nov 17, 2013 at 8:44 AM, Nick Coghlan  wrote:
>>> More accurately, it appears setuptools *does* support PEP 345 style
>>> environment markers, it just isn't documented at
>>> http://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies
>>> *sigh*
>>
>> That's because it's technically an experimental feature I hacked into
>> 0.6c12 development shortly before the distribute merge in order to
>> handle setuptools' own requirements for SSL, so that setuptools could
>> ship just one platform-independent egg and still have
>> platform-specific dependencies.  ;-)
>>
>> I think Jason et al may have since upgraded it to a supported feature,
>> but last I looked I think there may have still been issues with Jython
>> support for the feature.
>>
>> So, the lack of documentation may still be a feature rather than a bug ATM.  
>> ;-)
>
> A fair point :)
>
> Regardless, it highlights the fact I need to ensure PEP 426 preserves
> the legacy spellings for the markers that have dots in their names in
> metadata 1.2 (https://bitbucket.org/pypa/pypi-metadata-formats/issue/12).

Eh?  I implemented PEP 426 (draft-at-the-time) markers in the feature
I mentioned above.

Hm.  Actually, looking over it now, I see the real reason it's
experimental: it was implemented based on consensus-in-progress for
PEP 426, so not a finalized PEP.  It also sort-of handles PEP 345.
And the Jython fallback, IIRC, was maybe only doing PEP 345.  (And
setuptools itself only needed the Python version and platform name.)

So it's actually a bit of a mess -- which is why it wasn't documented,
in order to avoid people forcing the new PEP's hand with another de
facto standard.  I just figured it would get us most of the way there
and when the PEP dust settled, the tests and code could be tweaked a
bit to match, then documented with reference to the PEP.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-19 Thread Nick Coghlan
On 19 November 2013 15:09, PJ Eby  wrote:
> On Sun, Nov 17, 2013 at 8:44 AM, Nick Coghlan  wrote:
>> More accurately, it appears setuptools *does* support PEP 345 style
>> environment markers, it just isn't documented at
>> http://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies
>> *sigh*
>
> That's because it's technically an experimental feature I hacked into
> 0.6c12 development shortly before the distribute merge in order to
> handle setuptools' own requirements for SSL, so that setuptools could
> ship just one platform-independent egg and still have
> platform-specific dependencies.  ;-)
>
> I think Jason et al may have since upgraded it to a supported feature,
> but last I looked I think there may have still been issues with Jython
> support for the feature.
>
> So, the lack of documentation may still be a feature rather than a bug ATM.  
> ;-)

A fair point :)

Regardless, it highlights the fact I need to ensure PEP 426 preserves
the legacy spellings for the markers that have dots in their names in
metadata 1.2 (https://bitbucket.org/pypa/pypi-metadata-formats/issue/12).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-18 Thread PJ Eby
On Sun, Nov 17, 2013 at 8:44 AM, Nick Coghlan  wrote:
> More accurately, it appears setuptools *does* support PEP 345 style
> environment markers, it just isn't documented at
> http://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies
> *sigh*

That's because it's technically an experimental feature I hacked into
0.6c12 development shortly before the distribute merge in order to
handle setuptools' own requirements for SSL, so that setuptools could
ship just one platform-independent egg and still have
platform-specific dependencies.  ;-)

I think Jason et al may have since upgraded it to a supported feature,
but last I looked I think there may have still been issues with Jython
support for the feature.

So, the lack of documentation may still be a feature rather than a bug ATM.  ;-)
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-17 Thread Nick Coghlan
On 17 November 2013 14:05, Donald Stufft  wrote:
>
> On Nov 16, 2013, at 8:58 PM, Nick Coghlan  wrote:
> The specific case affecting IPython was the need to define platform
> dependent dependencies. Metadata 2.0 will handle that, but isn't going to
be
> available until pip 1.6 at the earliest. (That does suggest "Does this let
> IPython start publishing wheels?" would make a good acceptance criterion
for
> PEP 426 et al. It can join the setuptools metadata replacement criteria,
the
> Linux distro integration criteria and the Twisted plugin model handling
> criteria).
>
> That’s not true, Wheel let’s you use environment markers.
>
> https://github.com/dstufft/twine/blob/master/setup.cfg#L9-L13

More accurately, it appears setuptools *does* support PEP 345 style
environment markers, it just isn't documented at
http://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies*sigh*

I filed a setuptools issue about the missing docs, but also suggested the
IPython folks wait for pip 1.5 to get the install-time script handling and
other wheel related fixes.

Cheers,
Nick.

-- 
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-17 Thread Thomas Heller

Am 16.11.2013 21:15, schrieb Paul Moore:

On 16 November 2013 17:59, Thomas Heller  wrote:

What is the preferred format to distribute Python-3 libraries (for Windows)
nowadays: wininst, egg, ...?


Wheel is the format of the future.

pip install will only use wheels (recent versions of pip)
wininst doesn't support virtualenv
egg is only supported by easy_install, which is not recommended these
days (use pip instead)
MSI is rarely used, and can't easily be converted to other formats

Personally, I'd recommend wheel and wininst.


Ok, I'll probably follow this recommandation (but maybe I'll also
include egg).

Another question:

Is there a way to mark the distribution so that it will work for
Python 3.3 and 3.4, but not 2.x, 3.0, 3.1, or 3.2? There are existing
installers for 2.x (containing compiled extensions) already registered
on pypi.

All this is for py2exe.  Maybe I should name the python3 version 
'py3exe' instead ;-)


Thomas


___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Donald Stufft

On Nov 16, 2013, at 8:58 PM, Nick Coghlan  wrote:

> 
> On 17 Nov 2013 08:07, "Donald Stufft"  wrote:
> >
> > Wheels are way faster for pure python though, so they should totally be
> > uploaded :D
> 
> In chatting to someone proposing a patch for IPython to start publishing 
> wheels, I noted that wheels don't yet work even for distributions with 
> essential logic in their setup.py file, even if it's a pure Python 
> distribution.
> 
> The specific case affecting IPython was the need to define platform dependent 
> dependencies. Metadata 2.0 will handle that, but isn't going to be available 
> until pip 1.6 at the earliest. (That does suggest "Does this let IPython 
> start publishing wheels?" would make a good acceptance criterion for PEP 426 
> et al. It can join the setuptools metadata replacement criteria, the Linux 
> distro integration criteria and the Twisted plugin model handling criteria).
> 

That’s not true, Wheel let’s you use environment markers.

https://github.com/dstufft/twine/blob/master/setup.cfg#L9-L13

-
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Nick Coghlan
On 17 Nov 2013 08:07, "Donald Stufft"  wrote:
>
> Wheels are way faster for pure python though, so they should totally be
> uploaded :D

In chatting to someone proposing a patch for IPython to start publishing
wheels, I noted that wheels don't yet work even for distributions with
essential logic in their setup.py file, even if it's a pure Python
distribution.

The specific case affecting IPython was the need to define platform
dependent dependencies. Metadata 2.0 will handle that, but isn't going to
be available until pip 1.6 at the earliest. (That does suggest "Does this
let IPython start publishing wheels?" would make a good acceptance
criterion for PEP 426 et al. It can join the setuptools metadata
replacement criteria, the Linux distro integration criteria and the Twisted
plugin model handling criteria).

Cheers,
Nick.

>
> On Nov 16, 2013, at 5:06 PM, Paul Moore  wrote:
>
> > On 16 November 2013 21:59, Donald Stufft  wrote:
> >> And sdist!
> >
> > Sorry - I assumed compiled C extensions. You'll always provide sdist,
> > and unless you're distributing a compiled extension, that's all you'll
> > need. (Wheel distributions even for pure Python is the intention in
> > the future, but they aren't needed currently).
> >
> > Paul
>
>
> -
> Donald Stufft
> PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372
DCFA
>
>
> ___
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Donald Stufft
Wheels are way faster for pure python though, so they should totally be
uploaded :D

On Nov 16, 2013, at 5:06 PM, Paul Moore  wrote:

> On 16 November 2013 21:59, Donald Stufft  wrote:
>> And sdist!
> 
> Sorry - I assumed compiled C extensions. You'll always provide sdist,
> and unless you're distributing a compiled extension, that's all you'll
> need. (Wheel distributions even for pure Python is the intention in
> the future, but they aren't needed currently).
> 
> Paul


-
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Paul Moore
On 16 November 2013 21:59, Donald Stufft  wrote:
> And sdist!

Sorry - I assumed compiled C extensions. You'll always provide sdist,
and unless you're distributing a compiled extension, that's all you'll
need. (Wheel distributions even for pure Python is the intention in
the future, but they aren't needed currently).

Paul
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Donald Stufft
And sdist!

On Nov 16, 2013, at 3:15 PM, Paul Moore  wrote:

> On 16 November 2013 17:59, Thomas Heller  wrote:
>> What is the preferred format to distribute Python-3 libraries (for Windows)
>> nowadays: wininst, egg, ...?
> 
> Wheel is the format of the future.
> 
> pip install will only use wheels (recent versions of pip)
> wininst doesn't support virtualenv
> egg is only supported by easy_install, which is not recommended these
> days (use pip instead)
> MSI is rarely used, and can't easily be converted to other formats
> 
> Personally, I'd recommend wheel and wininst.
> 
> Paul
> ___
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> https://mail.python.org/mailman/listinfo/distutils-sig


-
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Paul Moore
On 16 November 2013 17:59, Thomas Heller  wrote:
> What is the preferred format to distribute Python-3 libraries (for Windows)
> nowadays: wininst, egg, ...?

Wheel is the format of the future.

pip install will only use wheels (recent versions of pip)
wininst doesn't support virtualenv
egg is only supported by easy_install, which is not recommended these
days (use pip instead)
MSI is rarely used, and can't easily be converted to other formats

Personally, I'd recommend wheel and wininst.

Paul
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Alex Clark
Thomas Heller  ctypes.org> writes:

> 
> What is the preferred format to distribute Python-3 libraries (for 
> Windows) nowadays: wininst, egg, ...?
> 
> It has been a long time that I have released something.


I don't know about preferred, but for Pillow we create all of them:
https://pypi.python.org/pypi?name=Pillow&version=2.2.1&:action=files



___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


[Distutils] Distribution format for Python3 libraries

2013-11-16 Thread Thomas Heller
What is the preferred format to distribute Python-3 libraries (for 
Windows) nowadays: wininst, egg, ...?


It has been a long time that I have released something.

Thanks,
Thomas

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig