https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
Web browser: --- Bug ID: 55584 Summary: Don't clutter /usr/lib/python2.7/site-packages/ Product: Pywikibot Version: unspecified Hardware: All OS: Linux Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: yardenack@gmail.com Classification: Unclassified Mobile Platform: ---
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?
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |High Status|UNCONFIRMED |NEW CC| |valhallasw@arctus.nl Version|unspecified |core (2.0) Ever confirmed|0 |1
--- Comment #1 from Merlijn van Deen valhallasw@arctus.nl --- 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
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 101661 had a related patch set uploaded by Merlijn van Deen: (bug 55584) only install pywikibot.*
https://gerrit.wikimedia.org/r/101661
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED CC| |info@gno.de Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 101661 merged by jenkins-bot: (bug 55584) only install pywikibot.*
https://gerrit.wikimedia.org/r/101661
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
yardenack@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |---
--- Comment #4 from yardenack@gmail.com --- 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.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://github.com/yardenac | |/pkgbuilds/blob/master/pack | |ages/python2-pywikibot-git/
--- Comment #5 from Merlijn van Deen valhallasw@arctus.nl --- 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.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55584
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |jayvdb@gmail.com Resolution|--- |WORKSFORME
--- Comment #6 from John Mark Vandenberg jayvdb@gmail.com --- 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.
pywikipedia-bugs@lists.wikimedia.org