...which is kinda annoying :-(
The problem is, in Python 2.6.2, line 357 of sdist.py.
This ends up applying the following:
exclude_pattern: applying regex r'^build.*'
...which of course chomps buildout.cfg, with no possibility to add it back in MANIFEST.in :-(
Where does the bug lie and should I submit a bug tracker issue?
cheers,
Chris
On Fri, Sep 11, 2009 at 11:53 AM, Chris Withers chris@simplistix.co.uk wrote:
...which is kinda annoying :-(
The problem is, in Python 2.6.2, line 357 of sdist.py.
This ends up applying the following:
exclude_pattern: applying regex r'^build.*'
...which of course chomps buildout.cfg, with no possibility to add it back in MANIFEST.in :-(
You can disable the prune option with --no-prune
you can also uset the the MANIFEST.in template file to define what's in your distribution.
That's for distutils. Beware that if you use Subversion and setuptools, it doesn't work the same way depending on what you've included in your repo, but at the end MANIFEST.in has the last word if you use it.
On Fri, Sep 11, 2009 at 11:58 AM, Tarek Ziadé ziade.tarek@gmail.com wrote:
On Fri, Sep 11, 2009 at 11:53 AM, Chris Withers chris@simplistix.co.uk wrote:
...which is kinda annoying :-(
The problem is, in Python 2.6.2, line 357 of sdist.py.
This ends up applying the following:
exclude_pattern: applying regex r'^build.*'
...which of course chomps buildout.cfg, with no possibility to add it back in MANIFEST.in :-(
You can disable the prune option with --no-prune
you can also uset the the MANIFEST.in template file to define what's in your distribution.
Let me add an example :
""" include buildout.cfg include README.txt recursive-include src *.py """
Tarek Ziadé wrote:
On Fri, Sep 11, 2009 at 11:53 AM, Chris Withers chris@simplistix.co.uk wrote:
...which is kinda annoying :-(
The problem is, in Python 2.6.2, line 357 of sdist.py.
This ends up applying the following:
exclude_pattern: applying regex r'^build.*'
...which of course chomps buildout.cfg, with no possibility to add it back in MANIFEST.in :-(
You can disable the prune option with --no-prune
To what? the sdist command? Can I put that in setup.cfg somewhere?
you can also uset the the MANIFEST.in template file to define what's in your distribution.
My MANIFEST.in currently contains:
include *
That's for distutils. Beware that if you use Subversion and setuptools, it doesn't work the same way depending on what you've included in your repo, but at the end MANIFEST.in has the last word if you use it.
I've tried with distutils, setuptools and distribute. All exhibit the same behaviour...
Chris
On Fri, Sep 11, 2009 at 12:02 PM, Chris Withers chris@simplistix.co.uk wrote:
Tarek Ziadé wrote:
On Fri, Sep 11, 2009 at 11:53 AM, Chris Withers chris@simplistix.co.uk wrote:
...which is kinda annoying :-(
The problem is, in Python 2.6.2, line 357 of sdist.py.
This ends up applying the following:
exclude_pattern: applying regex r'^build.*'
...which of course chomps buildout.cfg, with no possibility to add it back in MANIFEST.in :-(
You can disable the prune option with --no-prune
To what? the sdist command? Can I put that in setup.cfg somewhere?
yes you can, http://docs.python.org/distutils/configfile.html
you can also uset the the MANIFEST.in template file to define what's in your distribution.
My MANIFEST.in currently contains:
include *
this is suppose to include all file alongside setup.py (but no subdirs)
Tarek Ziadé wrote:
My MANIFEST.in currently contains:
include *
this is suppose to include all file alongside setup.py (but no subdirs)
I know! ;-)
It's not though...
Using disutils and with the following MANIFEST.in and DISTUTILS_DEBUG=true in the environment:
Distribution.parse_config_files(): options (after parsing config files): no commands known yet options (after parsing command line): option dict for 'sdist' command: {} running sdist Distribution.get_command_obj(): creating 'sdist' command object checking if setup.py newer than MANIFEST warning: sdist: standard file not found: should have one of README, README.txt Distribution.get_command_obj(): creating 'build_py' command object Distribution.get_command_obj(): creating 'build' command object reading manifest template 'MANIFEST.in' include buildout.cfg include_pattern: applying regex r'^buildout.cfg$' adding buildout.cfg exclude_pattern: applying regex r'^build.*' removing buildout.cfg
d'oh!
Chris
Chris Withers wrote:
this is suppose to include all file alongside setup.py (but no subdirs)
I know! ;-)
It's not though...
Using disutils and with the following MANIFEST.in
Sorry:
""" include buildout.cfg """
and DISTUTILS_DEBUG=true in the environment:
Distribution.parse_config_files(): options (after parsing config files): no commands known yet options (after parsing command line): option dict for 'sdist' command: {} running sdist Distribution.get_command_obj(): creating 'sdist' command object checking if setup.py newer than MANIFEST warning: sdist: standard file not found: should have one of README, README.txt Distribution.get_command_obj(): creating 'build_py' command object Distribution.get_command_obj(): creating 'build' command object reading manifest template 'MANIFEST.in' include buildout.cfg include_pattern: applying regex r'^buildout.cfg$' adding buildout.cfg exclude_pattern: applying regex r'^build.*' removing buildout.cfg
d'oh!
Chris
2009/9/11 Chris Withers chris@simplistix.co.uk:
Chris Withers wrote:
this is suppose to include all file alongside setup.py (but no subdirs)
I know! ;-)
It's not though...
Using disutils and with the following MANIFEST.in
Sorry:
""" include buildout.cfg """
I tested and it works for me with distutils@2.6 and I tried with the current trunk:
MANIFEST.in: include buildout.cfg
setup.py: from distutils.core import setup setup(name='ok')
resulting MANIFEST, by calling "python setup.py sdist" """ buildout.cfg setup.py """
I need to see the content of your setup.py, there must be an interaction with something else.
Tarek Ziadé wrote:
I tested and it works for me with distutils@2.6 and I tried with the current trunk:
Well, something must be different, have you double checked your sys.path?
C:\LocalSVN\errorhandler\branches\docs>python -c "import sys; print '\n'.join(sys.path)"
C:\WINDOWS\system32\python25.zip C:\Python25\DLLs C:\Python25\lib C:\Python25\lib\plat-win C:\Python25\lib\lib-tk C:\Python25 C:\Python25\lib\site-packages C:\Python25\lib\site-packages\gtk-2.0 C:\Python25\lib\site-packages\win32 C:\Python25\lib\site-packages\win32\lib C:\Python25\lib\site-packages\Pythonwin C:\LocalSVN\errorhandler\branches\docs>del MANIFEST
C:\LocalSVN\errorhandler\branches\docs>type setup.py import os from distutils.core import setup
package_name = 'errorhandler' package_dir = os.path.join(os.path.dirname(__file__),package_name)
setup( name=package_name, )
C:\LocalSVN\errorhandler\branches\docs>type MANIFEST.in include buildout.cfg
C:\LocalSVN\errorhandler\branches\docs>\Python26\python.exe --version Python 2.6.2
C:\LocalSVN\errorhandler\branches\docs>set DISTUTILS_DEBUG=true
C:\LocalSVN\errorhandler\branches\docs>\Python26\python.exe setup.py sdist Distribution.parse_config_files(): options (after parsing config files): no commands known yet options (after parsing command line): option dict for 'sdist' command: {} running sdist Distribution.get_command_obj(): creating 'sdist' command object warning: sdist: missing required meta-data: version, url warning: sdist: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) mus t be supplied checking if setup.py newer than MANIFEST warning: sdist: standard file not found: should have one of README, README.txt reading manifest template 'MANIFEST.in' include buildout.cfg include_pattern: applying regex r'^buildout.cfg$' adding buildout.cfg Distribution.get_command_obj(): creating 'build' command object exclude_pattern: applying regex r'^build.*' removing buildout.cfg
...
Maybe you have soem .rc file somewhere that distutils is picking up?
cheers,
Chris
On Fri, Sep 11, 2009 at 3:23 PM, Chris Withers chris@simplistix.co.uk wrote:
Tarek Ziadé wrote:
I tested and it works for me with distutils@2.6 and I tried with the current trunk:
Well, something must be different, have you double checked your sys.path?
C:\LocalSVN\errorhandler\branches\docs>python -c "import sys; print '\n'.join(sys.path)"
C:\WINDOWS\system32\python25.zip
That's you python 2.5
Distribution.get_command_obj(): creating 'build' command object exclude_pattern: applying regex r'^build.*' removing buildout.cfg
That must be a win32 specific bug then on the way globs are translated (\ should be escaped) with regular expressions. the exclude built on my mac os is :
'^build/.*'
which is correct. I will try on a vmware as soon I get a chance,
Until then you can fill an issue in bugs.python.org. I'll fix it as soon as I have a failing example in a unit test
Tarek
Tarek Ziadé wrote:
On Fri, Sep 11, 2009 at 3:23 PM, Chris Withers chris@simplistix.co.uk wrote:
Tarek Ziadé wrote:
I tested and it works for me with distutils@2.6 and I tried with the current trunk:
Well, something must be different, have you double checked your sys.path?
C:\LocalSVN\errorhandler\branches\docs>python -c "import sys; print '\n'.join(sys.path)"
C:\WINDOWS\system32\python25.zip
That's you python 2.5
Sorry, yes, forgot to use 2.6 for those first two bits, doesn't make any difference...
Distribution.get_command_obj(): creating 'build' command object exclude_pattern: applying regex r'^build.*' removing buildout.cfg
That must be a win32 specific bug then on the way globs are translated (\ should be escaped) with regular expressions. the exclude built on my mac os is :
'^build/.*'
which is correct. I will try on a vmware as soon I get a chance,
Until then you can fill an issue in bugs.python.org. I'll fix it as soon as I have a failing example in a unit test
http://bugs.python.org/issue6884
cheers,
Chris
Tarek Ziadé wrote:
...which of course chomps buildout.cfg, with no possibility to add it back in MANIFEST.in :-(
You can disable the prune option with --no-prune
Well, aside from the hassle this causes with having to manually exclude all the .svn files and the like, it also doesn't work on setuptools or distribute:
bin/docpy setup.py sdist --no-prune usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
error: option --no-prune not recognized
cheers,
Chris