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

__init__.py created in /usr/lib/python3.6/site-packages/tests when installed with pip #18

Open
doronbehar opened this issue May 23, 2018 · 3 comments

Comments

@doronbehar
Copy link

I'm reporting this issue after pimutils/todoman#302 . Here is my output when I run pip show --files gogs_client:

Name: gogs-client
Version: 1.0.6
Summary: A python library for interacting with a gogs server
Home-page: https://github.com/unfoldingWord-dev/python-gogs-client
Author: unfoldingWord
Author-email: ethantkoenig@gmail.com
License: MIT
Location: /usr/lib/python3.6/site-packages
Requires: requests, future, attrs
Required-by: 
Files:
  gogs_client-1.0.6.dist-info/DESCRIPTION.rst
  gogs_client-1.0.6.dist-info/INSTALLER
  gogs_client-1.0.6.dist-info/METADATA
  gogs_client-1.0.6.dist-info/RECORD
  gogs_client-1.0.6.dist-info/WHEEL
  gogs_client-1.0.6.dist-info/metadata.json
  gogs_client-1.0.6.dist-info/top_level.txt
  gogs_client/__init__.py
  gogs_client/__pycache__/__init__.cpython-36.pyc
  gogs_client/__pycache__/auth.cpython-36.pyc
  gogs_client/__pycache__/entities.cpython-36.pyc
  gogs_client/__pycache__/interface.cpython-36.pyc
  gogs_client/__pycache__/updates.cpython-36.pyc
  gogs_client/_implementation/__init__.py
  gogs_client/_implementation/__pycache__/__init__.cpython-36.pyc
  gogs_client/_implementation/__pycache__/http_utils.cpython-36.pyc
  gogs_client/_implementation/http_utils.py
  gogs_client/auth.py
  gogs_client/entities.py
  gogs_client/interface.py
  gogs_client/updates.py
  tests/__init__.py
  tests/__pycache__/__init__.cpython-36.pyc
  tests/__pycache__/http_utils_test.cpython-36.pyc
  tests/__pycache__/interface_test.cpython-36.pyc
  tests/gogs_client/__init__.py
  tests/gogs_client/__pycache__/__init__.cpython-36.pyc
  tests/gogs_client/__pycache__/auth.cpython-36.pyc
  tests/gogs_client/__pycache__/entities.cpython-36.pyc
  tests/gogs_client/__pycache__/interface.cpython-36.pyc
  tests/gogs_client/__pycache__/updates.cpython-36.pyc
  tests/gogs_client/_implementation/__init__.py
  tests/gogs_client/_implementation/__pycache__/__init__.cpython-36.pyc
  tests/gogs_client/_implementation/__pycache__/http_utils.cpython-36.pyc
  tests/gogs_client/_implementation/http_utils.py
  tests/gogs_client/auth.py
  tests/gogs_client/entities.py
  tests/gogs_client/interface.py
  tests/gogs_client/updates.py
  tests/http_utils_test.py
  tests/interface_test.py

As explained in the issue linked above, the directory tests/ is used in many projects and importing it causes users who have have gogs_client installed to import the wrong module.

@doronbehar
Copy link
Author

doronbehar commented May 23, 2018 via email

@WhyNotHugo
Copy link

I can help clarify the issue if you have any more questions, but, long story short, tests/__init__.py is probably not required. It definitely shouldn't get installed.

@doronbehar
Copy link
Author

Could it be a problem with the line packages=find_packages()? perhaps tests should be excluded from find_packages()'s output. I'm just guessing..

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

No branches or pull requests

2 participants