Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Minor changes to install script files to ensure contrib module is accessable #364

Closed
wants to merge 2 commits into from

Conversation

trcook
Copy link

@trcook trcook commented Dec 16, 2015

Docs at http://oauth2client.readthedocs.org/en/latest/source/oauth2client.contrib.html indicate that oauth2 client utility scripts for things like flask should be accessed at oauth2client.contrib .
Current setup.py and manifest.in is not setup for this and yeilds an install of the oauth2client module that does not include access to things like flask_util.

This problem is made worse by the fact that this problem has been pushed to pypy, so a fresh pip install will prevent access to flask_util et al.

updated setup.py to install appropriate submodules as indicated by http://oauth2client.readthedocs.org/en/latest/source/oauth2client.contrib.html
added line to ensure inclusion of relevant contrib submodules
@googlebot
Copy link
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@trcook
Copy link
Author

trcook commented Dec 16, 2015

I signed it!

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@@ -1 +1,2 @@
include README.md
include contrib/ **

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Dec 16, 2015

Thanks a lot for this!

How do you mean "pushed to pypy"? The last version pushed to PyPI was on Nov. 18, which was before the move to contrib (it may have existed in part, but not totally).

@@ -32,6 +32,8 @@

packages = [
'oauth2client',
'oauth2client.contrib',

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Dec 16, 2015

It seems the issue is how readthedocs builds. There must be some failure, probably due to failure to import django or something? I'll look into it.

The docs called "latest" does not reflect what is on PyPI. That is the "stable" docs

@dhermes
Copy link
Contributor

dhermes commented Dec 16, 2015

Most importantly, neither of these changes is necessary, but the docs build failure is worth filing a bug over

@dhermes
Copy link
Contributor

dhermes commented Dec 17, 2015

@trcook I am going to close this PR, but if you'd like to file the documentation bug (since you are the one that found the issue), feel free to file it.

@dhermes
Copy link
Contributor

dhermes commented Dec 17, 2015

Example of a broken build:
https://readthedocs.org/projects/oauth2client/builds/3568049/

@dhermes
Copy link
Contributor

dhermes commented Jan 6, 2016

@trcook @jonparrott FYI this is broken:

$ git clone [email protected]:google/oauth2client.git
$ cd oauth2client/
$ ls dist/
ls: cannot access dist/: No such file or directory
$ python setup.py sdist --formats=zip
running sdist
running egg_info
...
removing 'oauth2client-1.5.2' (and everything under it)
$ unzip dist/oauth2client-1.5.2.zip
Archive:  dist/oauth2client-1.5.2.zip
  inflating: oauth2client-1.5.2/README.md
  inflating: oauth2client-1.5.2/MANIFEST.in
  inflating: oauth2client-1.5.2/PKG-INFO
  inflating: oauth2client-1.5.2/setup.cfg
  inflating: oauth2client-1.5.2/setup.py
  inflating: oauth2client-1.5.2/oauth2client.egg-info/SOURCES.txt
  inflating: oauth2client-1.5.2/oauth2client.egg-info/top_level.txt
  inflating: oauth2client-1.5.2/oauth2client.egg-info/PKG-INFO
  inflating: oauth2client-1.5.2/oauth2client.egg-info/requires.txt
  inflating: oauth2client-1.5.2/oauth2client.egg-info/dependency_links.txt
  inflating: oauth2client-1.5.2/oauth2client/__init__.py
  inflating: oauth2client-1.5.2/oauth2client/crypt.py
  inflating: oauth2client-1.5.2/oauth2client/tools.py
  inflating: oauth2client-1.5.2/oauth2client/_openssl_crypt.py
  inflating: oauth2client-1.5.2/oauth2client/service_account.py
  inflating: oauth2client-1.5.2/oauth2client/client.py
  inflating: oauth2client-1.5.2/oauth2client/file.py
  inflating: oauth2client-1.5.2/oauth2client/util.py
  inflating: oauth2client-1.5.2/oauth2client/clientsecrets.py
  inflating: oauth2client-1.5.2/oauth2client/devshell.py
  inflating: oauth2client-1.5.2/oauth2client/_pycrypto_crypt.py
  inflating: oauth2client-1.5.2/oauth2client/_helpers.py

However, I think the right move is just using packages=setuptools.find_packages(). Will test it out and report back.

@dhermes
Copy link
Contributor

dhermes commented Jan 6, 2016

By making a small change:

diff --git a/MANIFEST.in b/MANIFEST.in
index bb3ec5f..39f5637 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1,2 @@
 include README.md
+recursive-exclude tests *
diff --git a/setup.py b/setup.py
index ab84790..ef6e2e1 100644
--- a/setup.py
+++ b/setup.py
@@ -28,12 +28,9 @@ if (3, 1) <= sys.version_info < (3, 3):
     print('oauth2client requires python3 version >= 3.3.', file=sys.stderr)
     sys.exit(1)

+from setuptools import find_packages
 from setuptools import setup

-packages = [
-    'oauth2client',
-]
-
 install_requires = [
     'httplib2>=0.9.1',
     'pyasn1>=0.1.7',
@@ -55,7 +52,7 @@ setup(
     author="Google Inc.",
     url="http://github.com/google/oauth2client/",
     install_requires=install_requires,
-    packages=packages,
+    packages=find_packages(),
     license="Apache 2.0",
     keywords="google oauth 2.0 http client",
     classifiers=[

this is the zip file that gets created

$ unzip dist/oauth2client-1.5.2.zip
Archive:  dist/oauth2client-1.5.2.zip
  inflating: oauth2client-1.5.2/README.md
  inflating: oauth2client-1.5.2/MANIFEST.in
  inflating: oauth2client-1.5.2/PKG-INFO
  inflating: oauth2client-1.5.2/setup.cfg
  inflating: oauth2client-1.5.2/setup.py
  inflating: oauth2client-1.5.2/oauth2client.egg-info/SOURCES.txt
  inflating: oauth2client-1.5.2/oauth2client.egg-info/top_level.txt
  inflating: oauth2client-1.5.2/oauth2client.egg-info/PKG-INFO
  inflating: oauth2client-1.5.2/oauth2client.egg-info/requires.txt
  inflating: oauth2client-1.5.2/oauth2client.egg-info/dependency_links.txt
  inflating: oauth2client-1.5.2/oauth2client/__init__.py
  inflating: oauth2client-1.5.2/oauth2client/crypt.py
  inflating: oauth2client-1.5.2/oauth2client/tools.py
  inflating: oauth2client-1.5.2/oauth2client/_openssl_crypt.py
  inflating: oauth2client-1.5.2/oauth2client/service_account.py
  inflating: oauth2client-1.5.2/oauth2client/client.py
  inflating: oauth2client-1.5.2/oauth2client/file.py
  inflating: oauth2client-1.5.2/oauth2client/util.py
  inflating: oauth2client-1.5.2/oauth2client/clientsecrets.py
  inflating: oauth2client-1.5.2/oauth2client/devshell.py
  inflating: oauth2client-1.5.2/oauth2client/_pycrypto_crypt.py
  inflating: oauth2client-1.5.2/oauth2client/_helpers.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/__init__.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_orm.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/gce.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/multistore_file.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/locked_file.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/flask_util.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/appengine.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/xsrfutil.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/keyring_storage.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/__init__.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/decorators.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/storage.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/signals.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/site.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/apps.py
  inflating: oauth2client-1.5.2/oauth2client/contrib/django_util/views.py

@theacodes
Copy link
Contributor

@dhermes seems like that's the way to go.

@dhermes
Copy link
Contributor

dhermes commented Jan 6, 2016

@trcook Care to update this PR or shall I send out a new one?

@dhermes
Copy link
Contributor

dhermes commented Jan 7, 2016

Sent out #382.

@dhermes dhermes closed this Jan 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants