distutils 0.6.28 filenames include whitespace

Mark Solaris avatarMark Solaris created an issue

These files include white space in their filenames: /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script template (dev).pyc /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script template.py /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script template (dev).py /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script template.pyc

This is against best practices on Unix machines and causes multiple problems when packaging, scripting and archiving. Package maintainers such as myself are unlikely to help share this software when it contains basic errors like this.

(This (older) version was auto-installed when installing MySQL_python-1.2.4b4)

Comments (5)

  1. Mark Solaris

    Those file names also include parentheses () as well which is another huge no-no. Shells will try to interpolate them unless they are escaped as well.

    % /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script\ template\ (dev).py
    Badly placed ()'s.
    
  2. Mark Solaris

    Here is the full recipe to fix the code:

        mv /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script\ template.py /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template.py
        mv /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script\ template.pyc /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template.pyc
        mv /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script\ template\ \(dev\).py /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template_dev.py
        mv /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script\ template\ \(dev\).pyc /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template_dev.pyc
        /bin/perl -pe 's%script template%script_template%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/command/easy_install.py
        /bin/perl -pe 's%script template%script_template%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template.pyc
        /bin/perl -pe 's%script template%script_template%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template_dev.pyc
        /bin/perl -pe 's%script template%script_template%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/EGG-INFO/SOURCES.txt
        /bin/perl -pe 's% \(dev\)%_dev%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/command/easy_install.py
        /bin/perl -pe 's% \(dev\)%_dev%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/script_template_dev.pyc
        /bin/perl -pe 's% \(dev\)%_dev%' -i /usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/EGG-INFO/SOURCES.txt
    
  3. Mark Solaris

    You should log enhancement requests against Solaris pkgmk, Linux rpm and apt etc. Then against tcsh, csh, sh and ksh. Then against tar, cpio, pax and zip. You'll need to include justification about why this tool absolutely must have invalid characters in the filenames. I've altered my distribute(1) source trees to eliminate the problem.

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.