Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing python-social-auth as a dependecie for mailman3 with buildout fails #623

Closed
ziegenberg opened this issue May 18, 2015 · 6 comments · Fixed by #635
Closed

Installing python-social-auth as a dependecie for mailman3 with buildout fails #623

ziegenberg opened this issue May 18, 2015 · 6 comments · Fixed by #635

Comments

@ziegenberg
Copy link

I tried to install Mailman 3 and its companions (Hyperkitty, Postorius) on a
Ubuntu 14.04.2 LTS using the mailman-bundler. I followed the docs:
http://mailman-bundler.readthedocs.org/en/latest/

It fails while trying to install 'python-social-aut':

(venv)mailman@jiffy02:~/mailman-bundler$ buildout
Getting distribution for 'python-social-auth>=0.2.3'.
No eggs found in
/tmp/easy_install-LK6bYy/python-social-auth-0.2.9/egg-dist-tmp-FzLeGP (setup
script problem?)
While:
Installing mailman-web.
Getting distribution for 'python-social-auth>=0.2.3'.
Error: Couldn't install: python-social-auth 0.2.9

I checked with the folks from mailman3 and they told me to file a bug here.

@abompard
Copy link
Contributor

You can test the install with buildout by creating a file called "buidout.cfg" in a temporary directory with the following content:

[buildout]
parts = main
[main]
recipe = zc.recipe.egg
eggs = python-social-auth

And running the "buildout" command.

@ziegenberg
Copy link
Author

I created a new temporary user, build a virtual environment and tested python-social-auth with buildout in two different versions.

testing@jiffy02:~$ virtualenv venv
testing@jiffy02:~$ source venv/bin/activate
(venv) testing@jiffy02:~$ pip install zc.buildout
(venv) testing@jiffy02:~$ buildout

buildout.cfg (#1)

[buildout]
parts = main
[main]
recipe = zc.recipe.egg
eggs = python-social-auth

It fails:

(venv)testing@jiffy02:~$ buildout
Creating directory '/home/testing/bin'.
Creating directory '/home/testing/parts'.
Creating directory '/home/testing/eggs'.
Creating directory '/home/testing/develop-eggs'.
Getting distribution for 'zc.recipe.egg>=2.0.0a3'.
Got zc.recipe.egg 2.0.1.
Installing main.
Getting distribution for 'python-social-auth'.
warning: no previously-included files matching '*' found under directory '.tox'
warning: no previously-included files matching '*.pyc' found under directory 'social'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.db' found under directory 'examples'
warning: no previously-included files matching 'local_settings.py' found under directory 'examples'
warning: no previously-included files matching '*' found under directory 'examples/webpy_example/sessions'
No eggs found in /tmp/easy_install-wyDf6z/python-social-auth-0.2.9/egg-dist-tmp-7Pz6Vl (setup script problem?)
While:
  Installing main.
  Getting distribution for 'python-social-auth'.
Error: Couldn't install: python-social-auth 0.2.9

buildout.cfg (#2)

[buildout]
parts = main
[main]
recipe = zc.recipe.egg
eggs = python-social-auth<0.2.9

It succeeds:

(venv)testing@jiffy02:~$ buildout
Creating directory '/home/testing/bin'.
Creating directory '/home/testing/parts'.
Creating directory '/home/testing/eggs'.
Creating directory '/home/testing/develop-eggs'.
Getting distribution for 'zc.recipe.egg>=2.0.0a3'.
Got zc.recipe.egg 2.0.1.
Installing main.
Getting distribution for 'python-social-auth<0.2.9'.
warning: no previously-included files matching '*.pyc' found under directory 'social'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.db' found under directory 'examples'
warning: no previously-included files matching 'local_settings.py' found under directory 'examples'
warning: no previously-included files matching '*' found under directory 'examples/webpy_example/sessions'
Got python-social-auth 0.2.7.
Getting distribution for 'PyJWT>=1.0.0'.
zip_safe flag not set; analyzing archive contents...
Got PyJWT 1.1.0.
Getting distribution for 'six>=1.2.0'.
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Got six 1.9.0.
Getting distribution for 'requests-oauthlib>=0.3.1'.
Got requests-oauthlib 0.5.0.
Getting distribution for 'oauthlib>=0.3.8'.
zip_safe flag not set; analyzing archive contents...
Got oauthlib 0.7.2.
Getting distribution for 'requests>=1.1.0'.
Got requests 2.7.0.
Getting distribution for 'python-openid>=2.2'.
warning: no files found matching 'CHANGELOG'
warning: no files found matching '*.css' under directory 'doc'
warning: no files found matching '*.html' under directory 'doc'
zip_safe flag not set; analyzing archive contents...
Got python-openid 2.2.5.

@wdoekes
Copy link

wdoekes commented May 25, 2015

Same problem over here. I did a manual download of python-social 0.2.9, untar, python setup.py bdist_egg, unzip of that egg, and the mailman3 buildout continued without complaints.

(No idea what I did though, I never use buildout nor eggs.)

@wdoekes
Copy link

wdoekes commented May 25, 2015

Apparently this change:

--- python-social-auth-0.2.7/python_social_auth.egg-info/requires.txt   2015-04-19 09:13:58.000000000 +0200
+++ python-social-auth-0.2.9/python_social_auth.egg-info/requires.txt   2015-05-25 22:01:54.817050206 +0200
@@ -1,6 +1,6 @@
-python-openid>=2.2
+python3-openid>=3.0.1

I had to install the former to make things work. Installing the latter complained about py3-only stuff. (mailman setup scripts use py2).

@abompard
Copy link
Contributor

abompard commented Jun 1, 2015

OK I found the reason. In MANIFEST.in, the egg-info directory is ignored, and these files are necessary for easy_install to work. Buildout uses easy_install, thus triggers the error.
This can be easily reproduced with the command:

$ easy_install -md /tmp http://pypi.python.org/packages/source/p/python-social-auth/python-social-auth-0.2.10.tar.gz

The fix is as easy as:

diff --git a/MANIFEST.in b/MANIFEST.in
index 2cf5b48..d2fef43 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -7,7 +7,6 @@ recursive-include social/tests *.txt
 graft examples

 recursive-exclude .tox *
-recursive-exclude python_social_auth.egg-info *
 recursive-exclude social *.pyc
 recursive-exclude examples *.pyc
 recursive-exclude examples *.db

I'll send you a pull request ASAP.

abompard added a commit to hyperkitty/python-social-auth that referenced this issue Jun 1, 2015
@Cykooz
Copy link

Cykooz commented Jun 25, 2015

Please, apply the patch from abompard and release a new version. Until that happens, I can only use the version 0.2.7

@omab omab closed this as completed in #635 Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants