Re: [Distutils] wheel including files it shouldn't

2016-04-28 Thread Daniel Holth
If you'd like to have more control over what's installed, we could re-visit
the idea of adding more categories of files within distributions based on
the model of "copy each category of files to a [configurable] target
directory". Perhaps there could even be a "necessary" flag on each category
to indicate whether the code accessed those files at runtime or not.

On Thu, Apr 28, 2016 at 2:31 PM Alex Grönholm 
wrote:

> To what end?
>
>
> 28.04.2016, 21:21, Barry Warsaw kirjoitti:
>
> On Apr 27, 2016, at 10:00 PM, Alex Grönholm wrote:
>
>
> The sdist should include all the source files, including tests and
> documentation. In binary distributions, however, they are just dead
> weight. Do you want the full documentation and test suites to be installed
> for every single dependency when you deploy your application? I sure don't.
>
>
> Shouldn't that be left to the package author to decide?
>
> -Barry
>
>
>
> ___
> Distutils-SIG maillist  -  
> Distutils-SIG@python.orghttps://mail.python.org/mailman/listinfo/distutils-sig
>
>
> ___
> 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] wheel including files it shouldn't

2016-04-28 Thread Alex Grönholm

To what end?

28.04.2016, 21:21, Barry Warsaw kirjoitti:

On Apr 27, 2016, at 10:00 PM, Alex Grönholm wrote:


The sdist should include all the source files, including tests and
documentation. In binary distributions, however, they are just dead
weight. Do you want the full documentation and test suites to be installed
for every single dependency when you deploy your application? I sure don't.

Shouldn't that be left to the package author to decide?

-Barry


___
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] wheel including files it shouldn't

2016-04-28 Thread Barry Warsaw
On Apr 27, 2016, at 10:00 PM, Alex Grönholm wrote:

>The sdist should include all the source files, including tests and
>documentation. In binary distributions, however, they are just dead
>weight. Do you want the full documentation and test suites to be installed
>for every single dependency when you deploy your application? I sure don't.

Shouldn't that be left to the package author to decide?

-Barry


pgpYtPzVV03fY.pgp
Description: OpenPGP digital signature
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] wheel including files it shouldn't

2016-04-28 Thread Daniel Holth
Wheel has a proposal for a "wheel pack" command that might help you.

On Thu, Apr 28, 2016, 12:46 Steve Dower  wrote:

> On 27Apr2016 1445, Paul Moore wrote:
> > Personally, I agree with Donald that the "normal" process of building
> > a distribution should be:
> >
> > 1. Build the sdist.
> > 2. Build wheels *from* that sdist.
> > 3. Check the built sdist and wheels.
> > 4. Upload the files once you've confirmed they are OK.
> >
> > The tools should make that as transparent as possible (I'm not averse
> > to a command that builds sdist and wheels together, but such a command
> > could easily use the sdist to build the wheels "behind the scenes")
> > and there may be special cases (incremental builds of wheels when a
> > full recompile is a significant cost) but those are quality of
> > implementation details.
>
> One extra task that I often need is the ability to separate bdist_ext
> from bdist_wheel, so that I can apply modifications to built modules
> (e.g. code signing) before packaging up the wheel.
>
> There's probably a way to insert this step using a setuptools extension
> or a setup.py hack, but it's actually most convenient to have two
> completely separate commands (or options) for building and packaging.
>
> Cheers,
> Steve
> ___
> 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] wheel including files it shouldn't

2016-04-28 Thread Steve Dower

On 27Apr2016 1445, Paul Moore wrote:

Personally, I agree with Donald that the "normal" process of building
a distribution should be:

1. Build the sdist.
2. Build wheels *from* that sdist.
3. Check the built sdist and wheels.
4. Upload the files once you've confirmed they are OK.

The tools should make that as transparent as possible (I'm not averse
to a command that builds sdist and wheels together, but such a command
could easily use the sdist to build the wheels "behind the scenes")
and there may be special cases (incremental builds of wheels when a
full recompile is a significant cost) but those are quality of
implementation details.


One extra task that I often need is the ability to separate bdist_ext 
from bdist_wheel, so that I can apply modifications to built modules 
(e.g. code signing) before packaging up the wheel.


There's probably a way to insert this step using a setuptools extension 
or a setup.py hack, but it's actually most convenient to have two 
completely separate commands (or options) for building and packaging.


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


Re: [Distutils] wheel including files it shouldn't

2016-04-28 Thread Leonardo Rochael Almeida
Actually, another thing you can do with the wheels at this point is to take
them for a spin :-)

Have pip in another virtualenv install it by using --find-links, or even
setting your own local index.

If you have tests embedded in your wheel, now would be a good time to run
them.

Best regards,

Leo

On 28 April 2016 at 05:03, Paul Moore  wrote:

> On 28 April 2016 at 00:57, Ethan Furman  wrote:
> > What types of things should I be doing for (3) ?
>
> You could check the contents of the wheels to ensure they don't
> contain unexpected files :-)
>
> But in all honesty, probably not much. I only noted it as it's the
> only place you can verify the actual files you're uploading.
> Paul
> ___
> 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] wheel including files it shouldn't

2016-04-28 Thread Paul Moore
On 28 April 2016 at 00:57, Ethan Furman  wrote:
> What types of things should I be doing for (3) ?

You could check the contents of the wheels to ensure they don't
contain unexpected files :-)

But in all honesty, probably not much. I only noted it as it's the
only place you can verify the actual files you're uploading.
Paul
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/27/2016 02:45 PM, Paul Moore wrote:

On 27 April 2016 at 18:39, Ethan Furman wrote:



# Upload the files once you've checked them
twine upload *.whl dist/* # because setup.py upload can't upload prebuilt files


What a pain.  :(



Personally, I agree with Donald that the "normal" process of building
a distribution should be:

1. Build the sdist.
2. Build wheels *from* that sdist.
3. Check the built sdist and wheels.
4. Upload the files once you've confirmed they are OK.


What types of things should I be doing for (3) ?

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Paul Moore
On 27 April 2016 at 18:39, Ethan Furman  wrote:
> My current process is:
>
>   python3.5 setup.py sdist --format=gztar,zip bdist_wheel upload
>
> What should I be doing instead?

My suggestion would be

# Build the sdist
python3.5 setup.py sdist --format=gztar,zip
# Build the wheel *from that sdist*
python3.5 -m pip wheel dist/*.zip # the path to the sdist built just above
# Upload the files once you've checked them
twine upload *.whl dist/* # because setup.py upload can't upload prebuilt files

But I agree that's somewhat clumsy compared to the command you used.
It has the benefit of working correctly though :-)

I agree that it's a bug that the bdist_wheel command doesn't respect
your MANIFEST.in. It's also a (design-level) bug that bdist_wheel
*needs* to implement MANIFEST.in support for itself.
IMO, it's a further bug that setup.py upload doesn't allow you to
build the files first, test them, and *then* upload them.

Personally, I agree with Donald that the "normal" process of building
a distribution should be:

1. Build the sdist.
2. Build wheels *from* that sdist.
3. Check the built sdist and wheels.
4. Upload the files once you've confirmed they are OK.

The tools should make that as transparent as possible (I'm not averse
to a command that builds sdist and wheels together, but such a command
could easily use the sdist to build the wheels "behind the scenes")
and there may be special cases (incremental builds of wheels when a
full recompile is a significant cost) but those are quality of
implementation details.

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/27/2016 12:18 PM, Daniel Holth wrote:


To answer the original question, report the bug here
https://bitbucket.org/pypa/wheel


What do you know, it's already there!  ;)

https://bitbucket.org/pypa/wheel/issues/99/cannot-exclude-directory

--
~Ethan~

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Michael Merickel
On Wed, Apr 27, 2016 at 2:18 PM, Daniel Holth  wrote:

> To answer the original question, report the bug here
> https://bitbucket.org/pypa/wheel
>

It looksl ike there's already a similar bug opened at
https://bitbucket.org/pypa/wheel/issues/147/bdist_wheel-should-start-by-cleaning-up

I ran into this when releasing the latest versions of Pyramid as well. It's
definitely not clear how building a wheel interacts with the build folder
or manifest. Things I've never had to think about when building sdists.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Daniel Holth
To answer the original question, report the bug here
https://bitbucket.org/pypa/wheel

On Wed, Apr 27, 2016 at 3:10 PM Ethan Furman  wrote:

> On 04/27/2016 12:00 PM, Alex Grönholm wrote:
>
> > The sdist should include all the source files, including tests and
> > documentation. In binary distributions, however, they are just dead
> > weight. Do you want the full documentation and test suites to be
> > installed for every single dependency when you deploy your application?
> > I sure don't.
>
> That's makes a certain amount of sense.
>
> It also raises some questions:
>
> - are wheels a binary-only distribution?
>- if yes, we still have to use distutils to make source distributions?
>- if no, what are the commands to make source vs binary distributions?
>
> - is this just a matter of a properly configured setup.py?
>- if yes, what is that configuration?
>
> --
> ~Ethan~
> ___
> 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] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/27/2016 12:00 PM, Alex Grönholm wrote:


The sdist should include all the source files, including tests and
documentation. In binary distributions, however, they are just dead
weight. Do you want the full documentation and test suites to be
installed for every single dependency when you deploy your application?
I sure don't.


That's makes a certain amount of sense.

It also raises some questions:

- are wheels a binary-only distribution?
  - if yes, we still have to use distutils to make source distributions?
  - if no, what are the commands to make source vs binary distributions?

- is this just a matter of a properly configured setup.py?
  - if yes, what is that configuration?

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Alex Grönholm
The sdist should include all the source files, including tests and 
documentation. In binary distributions, however, they are just dead 
weight. Do you want the full documentation and test suites to be 
installed for every single dependency when you deploy your application? 
I sure don't.


27.04.2016, 21:40, Ethan Furman kirjoitti:

On 04/27/2016 11:13 AM, Alex Grönholm wrote:


Are you seriously saying that you want your bdists to include tests,
documentation etc.?


However you and I agree or disagree on what should be in a bdist, the 
command I ran should have produced a bdist based on the sdists I just 
created in the same command.



Most developers would not agree with you, including yours truly.


Well, we disagree.  To me, the salient difference between an sdist and 
a bdist is whether binary artifacts are, um, already built.  I 
certianly enjoy having docs (so I know how to use the binaries I just 
installed) and tests (so I can assure myself the binaries work as 
advertised).


If a project is big enough I can see making separate packages for docs 
and/or tests, but mine are small.


And whichever way we decide to do the packaging, the tools should work 
for us, not us for the tools.


--
~Ethan~

___
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] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/27/2016 11:13 AM, Alex Grönholm wrote:


Are you seriously saying that you want your bdists to include tests,
documentation etc.?


However you and I agree or disagree on what should be in a bdist, the 
command I ran should have produced a bdist based on the sdists I just 
created in the same command.



Most developers would not agree with you, including yours truly.


Well, we disagree.  To me, the salient difference between an sdist and a 
bdist is whether binary artifacts are, um, already built.  I certianly 
enjoy having docs (so I know how to use the binaries I just installed) 
and tests (so I can assure myself the binaries work as advertised).


If a project is big enough I can see making separate packages for docs 
and/or tests, but mine are small.


And whichever way we decide to do the packaging, the tools should work 
for us, not us for the tools.


--
~Ethan~

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Daniel Holth
Whatever the ideal situation (not using distutils at all would be a
suggestion) bdist_wheel certainly has some simple bugs that make it less
fun to use sometimes.

On Wed, Apr 27, 2016 at 2:14 PM Alex Grönholm 
wrote:

> Are you seriously saying that you want your bdists to include tests,
> documentation etc.?
> Most developers would not agree with you, including yours truly.
>
> 27.04.2016, 21:10, Ethan Furman kirjoitti:
> > On 04/27/2016 10:52 AM, Donald Stufft wrote:
> >
> >> This isn't really a problem with what you're doing. Rather it's an issue
> >> with the toolchain and and open question whether or not wheels should
> >> conceptually be able to be produced from a checkout, or if they should
> >> only be produced from a sdist. Problems like this are why I advocate the
> >> Checkout -> sdist -> wheel being the only path, but others feel
> >> differently.
> >
> > As a simple user, my feelings are that the command I used should have
> > generated three equivalent distributions, but did not.  That feels
> > like a bug.  :(
> >
> > Let me rephrase my question:  what command do I use to build the wheel
> > from the sdist I just made?  For bonus points:  why can't setup do
> > that for me?
> >
> > --
> > ~Ethan~
> >
> > ___
> > 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
>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Donald Stufft
On Apr 27 2016, at 2:09 pm, Ethan Furman et...@stoneleaf.us wrote:  

> On 04/27/2016 10:52 AM, Donald Stufft wrote:

>

>  This isn't really a problem with what you're doing. Rather it's an
issue  
 with the toolchain and and open question whether or not wheels should  
 conceptually be able to be produced from a checkout, or if they should  
 only be produced from a sdist. Problems like this are why I advocate the  
 Checkout - sdist - wheel being the only path, but others feel
differently.

>

> As a simple user, my feelings are that the command I used should have  
generated three equivalent distributions, but did not. That feels like  
a bug. :(

  

I agree with you. Others don't believe it to be a big deal.  

  

> Let me rephrase my question: what command do I use to build the wheel  
from the sdist I just made? For bonus points: why can't setup do that  
for me?

>

>  

  

You can first build the sdist, then unpack it into a directory and then run
``setup.py bdist_wheel`` inside of that directory.

  

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Alex Grönholm
Are you seriously saying that you want your bdists to include tests, 
documentation etc.?

Most developers would not agree with you, including yours truly.

27.04.2016, 21:10, Ethan Furman kirjoitti:

On 04/27/2016 10:52 AM, Donald Stufft wrote:


This isn't really a problem with what you're doing. Rather it's an issue
with the toolchain and and open question whether or not wheels should
conceptually be able to be produced from a checkout, or if they should
only be produced from a sdist. Problems like this are why I advocate the
Checkout -> sdist -> wheel being the only path, but others feel 
differently.


As a simple user, my feelings are that the command I used should have 
generated three equivalent distributions, but did not.  That feels 
like a bug.  :(


Let me rephrase my question:  what command do I use to build the wheel 
from the sdist I just made?  For bonus points:  why can't setup do 
that for me?


--
~Ethan~

___
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] wheel including files it shouldn't

2016-04-27 Thread Daniel Holth
No I mean the build directory.

On Wed, Apr 27, 2016, 14:11 Ethan Furman  wrote:

> On 04/27/2016 11:05 AM, Daniel Holth wrote:
>
> > Bdist_wheel just doesn't understand MANIFEST.in . Perhaps support could
> > be adapted from bdist_egg or other bdist implementations. Wheel doesn't
> > do everything the setuptools or distutils implementations put into their
> > dist commands. Even something as simple as a forced clean of the dist
> > directory on init may fix the problem?
>
> Um, does that mean it would destroy my files-in-progress?  'Cause that
> would really [insert colloquial phrase meaning extreme irritation here].
>
> --
> ~Ethan~
>
> ___
> 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] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/27/2016 11:05 AM, Daniel Holth wrote:


Bdist_wheel just doesn't understand MANIFEST.in . Perhaps support could
be adapted from bdist_egg or other bdist implementations. Wheel doesn't
do everything the setuptools or distutils implementations put into their
dist commands. Even something as simple as a forced clean of the dist
directory on init may fix the problem?


Um, does that mean it would destroy my files-in-progress?  'Cause that 
would really [insert colloquial phrase meaning extreme irritation here].


--
~Ethan~

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Donald Stufft
You can try to patch around the problem (and do it in every single alternative
build system once we enable support for that) or you can just fix the problem
at the "protocol" level once and for all. The fundamental problem isn't with
MANIFEST.in, it's that some indeterminite steps need to run to produce a sdist
and unless you make sure you run every single one of those steps you can have
no confidence that the results of producing a wheel from a VCS checkout will
be the same as installing from a sdist or building a wheel from a sdist.  
  
— Donald Stufft  

On Apr 27 2016, at 2:05 pm, Daniel Holth dho...@gmail.com wrote:  

> I feel differently.

>

> Bdist_wheel just doesn't understand MANIFEST.in . Perhaps support could be
adapted from bdist_egg or other bdist implementations. Wheel doesn't do
everything the setuptools or distutils implementations put into their dist
commands. Even something as simple as a forced clean of the dist directory on
init may fix the problem?

>

>  

>

> On Wed, Apr 27, 2016, 13:52 Donald Stufft
[don...@stufft.io](mailto:don...@stufft.io) wrote:  

>

>> This isn't really a problem with what you're doing. Rather it's an issue
with the toolchain and and open question whether or not wheels should
conceptually be able to be produced from a checkout, or if they should only be
produced from a sdist. Problems like this are why I advocate the Checkout
- sdist - wheel being the only path, but others feel differently.

>>

>>  
  
— Donald Stufft

>>

>>  

>>

>> On Apr 27 2016, at 1:38 pm, Ethan Furman
[et...@stoneleaf.us](mailto:et...@stoneleaf.us) wrote:  

>>

>>> On 04/26/2016 07:10 AM, Donald Stufft wrote:

>>>

>>>  Alternatively, he could have just produced a wheel from any checkout
at  
 all if the MANIFEST.in excluded a file that would otherwise have been  
 installed.

>>>

>>> Yes. My MANIFEST.in starts with an 'exclude enum/*' and then includes  
all files it wants.

>>>

>>>  This sort of thing is why I'm an advocate that we should only  
 build sdists from checkouts, and wheels from sdists (at the low level  
 anyways, even if the UI allows people to appear to create a wheel  
 straight from a checkout).

>>>

>>> My current process is:

>>>

>>>python3.5 setup.py sdist --format=gztar,zip bdist_wheel upload

>>>

>>> What should I be doing instead?

>>>

>>> \--  
~Ethan~

>>>

>>> ___  
Distutils-SIG maillist - [Distutils-SIG@python.org](mailto:Distutils-
s...@python.org)  


>>

>> ___  
Distutils-SIG maillist  -  [Distutils-SIG@python.org](mailto:Distutils-
s...@python.org)  
  

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/27/2016 10:52 AM, Donald Stufft wrote:


This isn't really a problem with what you're doing. Rather it's an issue
with the toolchain and and open question whether or not wheels should
conceptually be able to be produced from a checkout, or if they should
only be produced from a sdist. Problems like this are why I advocate the
Checkout -> sdist -> wheel being the only path, but others feel differently.


As a simple user, my feelings are that the command I used should have 
generated three equivalent distributions, but did not.  That feels like 
a bug.  :(


Let me rephrase my question:  what command do I use to build the wheel 
from the sdist I just made?  For bonus points:  why can't setup do that 
for me?


--
~Ethan~

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


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Daniel Holth
I feel differently.

Bdist_wheel just doesn't understand MANIFEST.in . Perhaps support could be
adapted from bdist_egg or other bdist implementations. Wheel doesn't do
everything the setuptools or distutils implementations put into their dist
commands. Even something as simple as a forced clean of the dist directory
on init may fix the problem?

On Wed, Apr 27, 2016, 13:52 Donald Stufft  wrote:

> This isn't really a problem with what you're doing. Rather it's an issue
> with the toolchain and and open question whether or not wheels should
> conceptually be able to be produced from a checkout, or if they should only
> be produced from a sdist. Problems like this are why I advocate the
> Checkout -> sdist -> wheel being the only path, but others feel differently.
>
>
> — Donald Stufft
>
> On Apr 27 2016, at 1:38 pm, Ethan Furman  wrote:
>
>> On 04/26/2016 07:10 AM, Donald Stufft wrote:
>>
>> > Alternatively, he could have just produced a wheel from any checkout at
>> > all if the MANIFEST.in excluded a file that would otherwise have been
>> > installed.
>>
>> Yes. My MANIFEST.in starts with an 'exclude enum/*' and then includes
>> all files it wants.
>>
>> > This sort of thing is why I'm an advocate that we should only
>> > build sdists from checkouts, and wheels from sdists (at the low level
>> > anyways, even if the UI allows people to appear to create a wheel
>> > straight from a checkout).
>>
>> My current process is:
>>
>>python3.5 setup.py sdist --format=gztar,zip bdist_wheel upload
>>
>> What should I be doing instead?
>>
>> --
>> ~Ethan~
>>
>> ___
>> 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
>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] wheel including files it shouldn't

2016-04-27 Thread Donald Stufft
This isn't really a problem with what you're doing. Rather it's an issue with
the toolchain and and open question whether or not wheels should conceptually
be able to be produced from a checkout, or if they should only be produced
from a sdist. Problems like this are why I advocate the Checkout - sdist
- wheel being the only path, but others feel differently.  
  
— Donald Stufft  

On Apr 27 2016, at 1:38 pm, Ethan Furman et...@stoneleaf.us wrote:  

> On 04/26/2016 07:10 AM, Donald Stufft wrote:

>

>  Alternatively, he could have just produced a wheel from any checkout at  
 all if the MANIFEST.in excluded a file that would otherwise have been  
 installed.

>

> Yes. My MANIFEST.in starts with an 'exclude enum/*' and then includes  
all files it wants.

>

>  This sort of thing is why I'm an advocate that we should only  
 build sdists from checkouts, and wheels from sdists (at the low level  
 anyways, even if the UI allows people to appear to create a wheel  
 straight from a checkout).

>

> My current process is:

>

>python3.5 setup.py sdist --format=gztar,zip bdist_wheel upload

>

> What should I be doing instead?

>

> \--  
~Ethan~

>

> ___  
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] wheel including files it shouldn't

2016-04-27 Thread Ethan Furman

On 04/26/2016 07:10 AM, Donald Stufft wrote:


Alternatively, he could have just produced a wheel from any checkout at
all if the MANIFEST.in excluded a file that would otherwise have been
installed.


Yes.  My MANIFEST.in starts with an 'exclude enum/*' and then includes 
all files it wants.



This sort of thing is why I'm an advocate that we should only
build sdists from checkouts, and wheels from sdists (at the low level
anyways, even if the UI allows people to appear to create a wheel
straight from a checkout).


My current process is:

  python3.5 setup.py sdist --format=gztar,zip bdist_wheel upload

What should I be doing instead?

--
~Ethan~

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


Re: [Distutils] wheel including files it shouldn't

2016-04-26 Thread Ionel Cristian Mărieș
On Tue, Apr 26, 2016 at 5:11 PM, Paul Moore  wrote:

> > It looks like you have published a wheel built from a dirty checkout. The
> > 1.1.3 zip sdist produces a clean wheel, as expected. You should use
> > https://pypi.python.org/pypi/check-manifest in your release process.
>
> Ah, yes. enum/py35_test_enum.py is not part of the source tree or
> sdist, but is in the "enum" package directory, so will get picked up
> by packages=['enum']


​So yes, technically check-manifest don't have anything to do with
bdist_wheel (it does checks for sdist). But most probably it would had​
complained about unversioned file going into the sdist.

Maybe there should be a similar tool for bdist_wheel, "check-wheel" anyone?
What other checks could it have?



Thanks,
-- Ionel Cristian Mărieș, http://blog.ionelmc.ro
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] wheel including files it shouldn't

2016-04-26 Thread Paul Moore
On 26 April 2016 at 15:06, Ionel Cristian Mărieș  wrote:
> On Tue, Apr 26, 2016 at 4:46 PM, Ethan Furman  wrote:
>>
>> I just received a bug report for enum34 for python3 code in a test file.
>> Further research revealed that that file should not be included in the
>> distribution, and is not included in the .tar nor .zip bundles, only the
>> wheel bundle.
>>
>> Is this a known/fixed bug?  If not, where do I report it?
>
>
> It looks like you have published a wheel built from a dirty checkout. The
> 1.1.3 zip sdist produces a clean wheel, as expected. You should use
> https://pypi.python.org/pypi/check-manifest in your release process.

Ah, yes. enum/py35_test_enum.py is not part of the source tree or
sdist, but is in the "enum" package directory, so will get picked up
by packages=['enum']

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


Re: [Distutils] wheel including files it shouldn't

2016-04-26 Thread Donald Stufft
  

Alternatively, he could have just produced a wheel from any checkout at all if
the MANIFEST.in excluded a file that would otherwise have been installed. This
sort of thing is why I'm an advocate that we should only build sdists from
checkouts, and wheels from sdists (at the low level anyways, even if the UI
allows people to appear to create a wheel straight from a checkout).

On Apr 26 2016, at 10:07 am, Ionel Cristian Mărieș cont...@ionelmc.ro
wrote:  

>  

>

> It looks like you have published a wheel built from a dirty checkout. The
1.1.3 zip sdist produces a clean wheel, as expected. ​You should use
 in your release process.  

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