Including package data with Distribute
Hey guys, Please take a look at my question about including package data: http://stackoverflow.com/questions/1734373/including-package-data-with-distr... (I don't care whether you answer here or on StackOverflow.) Ram.
On Sun, Nov 15, 2009 at 5:14 PM, Ram Rachum
Hey guys,
Please take a look at my question about including package data:
http://stackoverflow.com/questions/1734373/including-package-data-with-distr...
(I don't care whether you answer here or on StackOverflow.)
I've change that behavior in Distutils (in Python trunk (2.7/3.2) ) Now all files mentioned in package_data will be included by default without having to write a MANIFEST.in file, and without having to use the magic behavior based on DVCS. Until then, I would recommend using an explicit MANIFEST.in and stick with plain Distutils options, so you don't rely on any VCS, and you don't add files by accidents, that are in your repository, but that you don't want to see added in your release. Distribute 0.7.x will probably stick with Distutils upcoming default behavior. Tarek
Tarek Ziadé
Until then, I would recommend using an explicit MANIFEST.in and stick with plain Distutils options,
You said on StackOverflow to look in distutils' docs to read about the template language for MANIFEST.in. http://docs.python.org/distutils/commandref.html?highlight=manifest Is this it? It's pretty lame. Does this really not support Windows? Please help. Ram.
On Mon, Nov 16, 2009 at 11:28 AM, Ram Rachum
Tarek Ziadé
writes: Until then, I would recommend using an explicit MANIFEST.in and stick with plain Distutils options,
You said on StackOverflow to look in distutils' docs to read about the template language for MANIFEST.in.
http://docs.python.org/distutils/commandref.html?highlight=manifest
Is this it?
It's pretty lame.
Yes it is, but other options are not better ATM. Including data files in a predictible and simple way is a recurrent problem with distutils.
Does this really not support Windows?
It should. I don't remember having problems on windows with MANIFEST.in. There also used to be problems where the MANIFEST was not regenerated correctly - I almost always remove MANIFEST everytime in my setup.py for most of my packages because of this. The problem is known, and is being discussed right now for distribute, so hopefully things will improve. David
David Cournapeau
On Mon, Nov 16, 2009 at 11:28 AM, Ram Rachum
wrote:
You said on StackOverflow to look in distutils' docs to read about the
template
language for MANIFEST.in.
http://docs.python.org/distutils/commandref.html?highlight=manifest
Is this it?
It's pretty lame.
Yes it is, but other options are not better ATM. Including data files in a predictible and simple way is a recurrent problem with distutils.
Does this really not support Windows?
It should. I don't remember having problems on windows with MANIFEST.in. There also used to be problems where the MANIFEST was not regenerated correctly - I almost always remove MANIFEST everytime in my setup.py for most of my packages because of this.
The problem is known, and is being discussed right now for distribute, so hopefully things will improve.
David
I'm really lost here. Can someone answer these question? Will MANIFEST.in work on Windows? Do I have to delete the MANIFEST file every time? Is this the sanest way right now to include data files? Ram.
On Mon, Nov 16, 2009 at 2:46 PM, Ram Rachum
http://docs.python.org/distutils/commandref.html?highlight=manifest
Is this it?
It's pretty lame.
Contribution to the doc is always welcome.
I'm really lost here.
Can someone answer these question? Will MANIFEST.in work on Windows?
yes.
Do I have to delete the MANIFEST file every time?
no. if you change MANIFEST.in, MANIFEST is rebuilt. You have to re-run the sdist command though.
Is this the sanest way right now to include data files?
yes.
Tarek Ziadé
no. if you change MANIFEST.in, MANIFEST is rebuilt. You have to re-run the sdist command though.
Okay, new development. I've written a MAINFEST.in file like this: recursive-include garlicsim_wx * recursive-exclude garlicsim_wx *.pyc When I do an sdist, I see all is good, it includes my images in the package. But, when I do a bdist_msi and run the installer, it doesn't copy the images to the garlicsim_wx folder in site-packages. Why? What do I do?
Ram Rachum
Okay, new development. I've written a MAINFEST.in file like this:
recursive-include garlicsim_wx * recursive-exclude garlicsim_wx *.pyc
When I do an sdist, I see all is good, it includes my images in the package. But, when I do a bdist_msi and run the installer, it doesn't copy the images to the garlicsim_wx folder in site-packages.
Why? What do I do?
Sorry, please ignore. I forgot to do include_package_data=True. Ram.
On Mon, Nov 16, 2009 at 3:09 PM, Ram Rachum
Tarek Ziadé
writes: no. if you change MANIFEST.in, MANIFEST is rebuilt. You have to re-run the sdist command though.
Okay, new development. I've written a MAINFEST.in file like this:
recursive-include garlicsim_wx * recursive-exclude garlicsim_wx *.pyc
When I do an sdist, I see all is good, it includes my images in the package. But, when I do a bdist_msi and run the installer, it doesn't copy the images to the garlicsim_wx folder in site-packages.
Why? What do I do?
Did you include them in "package_data" in your setup.py ?
[Tarek Ziadé, 2009-11-15]
On Sun, Nov 15, 2009 at 5:14 PM, Ram Rachum
wrote: Hey guys,
Please take a look at my question about including package data:
http://stackoverflow.com/questions/1734373/including-package-data-with-distr...
(I don't care whether you answer here or on StackOverflow.)
I've change that behavior in Distutils (in Python trunk (2.7/3.2) )
semi related: What's the preferred way to notify module (at install stage) about new data location when someone overrides --install-data (--install-data=/usr/share/foo/)? -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
On Mon, Nov 16, 2009 at 1:31 PM, Piotr Ozarowski
I've change that behavior in Distutils (in Python trunk (2.7/3.2) )
semi related:
What's the preferred way to notify module (at install stage) about new data location when someone overrides --install-data (--install-data=/usr/share/foo/)?
What is "module" here ? what's your use case ?
[Tarek Ziadé, 2009-11-16]
On Mon, Nov 16, 2009 at 1:31 PM, Piotr Ozarowski
wrote: [..] I've change that behavior in Distutils (in Python trunk (2.7/3.2) )
semi related:
What's the preferred way to notify module (at install stage) about new data location when someone overrides --install-data (--install-data=/usr/share/foo/)?
What is "module" here ? what's your use case ?
any library/package/extension/whatever that sits in site-packages directory I use --install-data to install non .py/.so files outside site-packages but then I have to patch the module to look for these files in the right directory as it still looks for them in site-packages. Wolodja mentioned something similar on [1] - if $data can be overridden in .egg-info (using --install-data), then that's what I'm looking for. It's just a proposal, though - I'm wondering how should I use --install-data now. [1] http://wiki.python.org/moin/Distutils/DiscussionOverview -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
participants (4)
-
David Cournapeau
-
Piotr Ozarowski
-
Ram Rachum
-
Tarek Ziadé