Last modified: 2014-07-26 02:18:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57584, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55584 - Don't clutter /usr/lib/python2.7/site-packages/
Don't clutter /usr/lib/python2.7/site-packages/
Status: RESOLVED WORKSFORME
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All Linux
: High normal
: ---
Assigned To: Pywikipedia bugs
https://github.com/yardenac/pkgbuilds...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 19:58 UTC by yardenack
Modified: 2014-07-26 02:18 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description yardenack 2013-10-10 19:58:56 UTC
It's reasonable to expect setup.py to install things in this directory:

 /usr/lib/python2.7/site-packages/pywikibot/

But it's not reasonable for it to also put things in these directories:

 /usr/lib/python2.7/site-packages/externals/
 /usr/lib/python2.7/site-packages/scripts/
 /usr/lib/python2.7/site-packages/tests/

What if every python project tried to do that?
Comment 1 Merlijn van Deen (test) 2013-10-10 20:04:43 UTC
Setting     packages=['pywikibot'],
 in setup.py does not seem to solve this.

Simple way to reproduce:

valhallasw@lisilwen:~/src/pwb/pywikibot-core$ virtualenv test
New python executable in test/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
valhallasw@lisilwen:~/src/pwb/pywikibot-core$ source test/bin/activate
valhallasw@lisilwen:~/src/pwb/pywikibot-core$ python setup.py install
(...)
(test)valhallasw@lisilwen:~/src/pwb/pywikibot-core$ ls -l test/lib/python2.7/site-packages/
total 40
drwxrwxr-x 4 valhallasw valhallasw 4096 Oct 10 22:03 distribute-0.6.24-py2.7.egg
-rw-rw-r-- 1 valhallasw valhallasw  235 Oct 10 22:03 easy-install.pth
drwxrwxr-x 3 valhallasw valhallasw 4096 Oct 10 22:04 externals
drwxrwxr-x 4 valhallasw valhallasw 4096 Oct 10 22:03 pip-1.1-py2.7.egg
drwxrwxr-x 7 valhallasw valhallasw 4096 Oct 10 22:04 pywikibot
drwxrwxr-x 2 valhallasw valhallasw 4096 Oct 10 22:04 Pywikipediabot-2.0b1-py2.7.egg-info
drwxrwxr-x 2 valhallasw valhallasw 4096 Oct 10 22:04 Pywikipediabot.egg-info
drwxrwxr-x 3 valhallasw valhallasw 4096 Oct 10 22:04 scripts
-rw-rw-r-- 1 valhallasw valhallasw   30 Oct 10 22:03 setuptools.pth
drwxrwxr-x 6 valhallasw valhallasw 4096 Oct 10 22:04 tests
Comment 2 Gerrit Notification Bot 2013-12-15 16:17:52 UTC
Change 101661 had a related patch set uploaded by Merlijn van Deen:
(bug 55584) only install pywikibot.*

https://gerrit.wikimedia.org/r/101661
Comment 3 Gerrit Notification Bot 2013-12-17 11:02:37 UTC
Change 101661 merged by jenkins-bot:
(bug 55584) only install pywikibot.*

https://gerrit.wikimedia.org/r/101661
Comment 4 yardenack 2013-12-31 07:57:08 UTC
Thanks, I'm trying again with commit b7bff6b. It is no longer installing those exact files but now it seems to install these, which are inappropriate for the same reason:

   /usr/lib/python2.7/site-packages/easy-install.pth
   /usr/lib/python2.7/site-packages/site.py
   /usr/lib/python2.7/site-packages/site.pyc
   /usr/lib/python2.7/site-packages/site.pyo

Should I open a new bug? I think this pretty much falls within the same scope.
Comment 5 Merlijn van Deen (test) 2013-12-31 09:37:11 UTC
I'm not sure -- it sounds like Setuptools installing itself to me (at least easy-install.pth is from Setuptools, and I think the site.py makes sure .egg's work.

Are you building on a system that has a recent-enough (2.0+) version of Setuptools installed? That might cause this, I think. It's not (or should not be) a runtime dependency, though.

Also, maybe you should use 

 python setup.py build

instead of 

 python setup.py install

as the latter is supposed to install dependencies, while the former just builds the set of files from to install.
Comment 6 John Mark Vandenberg 2014-07-25 11:36:53 UTC
setup.py install places all files in the following directory on my workstation.

/usr/lib/python2.7/site-packages/pywikibot-2.0b1-py2.7.egg

If you are still seeing files places in site-packages, please re-open and indicate which version of python and setuptools you are using.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links