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

Fix setup.py by dropping packagez() #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

altendky
Copy link

@altendky altendky commented Apr 1, 2020

#2

@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.887% when pulling ac593b7 on altendky:fix_setup_py into 87203ed on pySART:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.887% when pulling ac593b7 on altendky:fix_setup_py into 87203ed on pySART:master.

@altendky
Copy link
Author

altendky commented Apr 1, 2020

With master it grabs the source directory instead of what is installed and it doesn't work at all when I move to another directory.

altendky@p1:~/repos/pyccp$ git checkout master; venv/bin/pip install .; venv/bin/python -c 'import pyccp; print(pyccp); import pyccp.ccp; print(pyccp.ccp)'; cd blue; ../venv/bin/python -c 'import pyccp; print(pyccp); import pyccp.ccp; print(pyccp.ccp)'; cd -
Already on 'master'
Your branch is up to date with 'upstream/master'.
Processing /home/altendky/repos/pyccp
Requirement already satisfied: enum34 in ./venv/lib/python3.8/site-packages (from pyccp==0.9.0) (1.1.10)
Requirement already satisfied: future in ./venv/lib/python3.8/site-packages (from pyccp==0.9.0) (0.18.2)
Requirement already satisfied: mako in ./venv/lib/python3.8/site-packages (from pyccp==0.9.0) (1.1.2)
Requirement already satisfied: MarkupSafe>=0.9.2 in ./venv/lib/python3.8/site-packages (from mako->pyccp==0.9.0) (1.1.1)
Building wheels for collected packages: pyccp
  Building wheel for pyccp (setup.py) ... done
  Created wheel for pyccp: filename=pyccp-0.9.0-py3-none-any.whl size=2861 sha256=71fc671147afe7748fae1cf93c6b2ee76e6d702e4b871c67bf2cb9cfe7381c1c
  Stored in directory: /tmp/pip-ephem-wheel-cache-u8eo0okm/wheels/de/f1/d5/5e0a299b10e72919fabce83a96c02790d1d42ad697c402e80a
Successfully built pyccp
Installing collected packages: pyccp
  Attempting uninstall: pyccp
    Found existing installation: pyccp 0.9.0
    Uninstalling pyccp-0.9.0:
      Successfully uninstalled pyccp-0.9.0
Successfully installed pyccp-0.9.0
<module 'pyccp' from '/home/altendky/repos/pyccp/pyccp/__init__.py'>
<module 'pyccp.ccp' from '/home/altendky/repos/pyccp/pyccp/ccp.py'>
<module 'pyccp' (namespace)>
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pyccp.ccp'
/home/altendky/repos/pyccp

With this PR you still get the source when in the project root (I hate this about Python, this is the reason for src/pyccp/ layouts, but sure, lots of people don't do that) but it does get the installed copy when in another directory like it should.

altendky@p1:~/repos/pyccp$ git checkout fix_setup_py; venv/bin/pip install .; venv/bin/python -c 'import pyccp; print(pyccp); import pyccp.ccp; print(pyccp.ccp)'; cd blue; ../venv/bin/python -c 'import pyccp; print(pyccp); import pyccp.ccp; print(pyccp.ccp)'; cd -
Switched to branch 'fix_setup_py'
Your branch is up to date with 'origin/fix_setup_py'.
Processing /home/altendky/repos/pyccp
Requirement already satisfied: enum34 in ./venv/lib/python3.8/site-packages (from pyccp==0.9.0) (1.1.10)
Requirement already satisfied: future in ./venv/lib/python3.8/site-packages (from pyccp==0.9.0) (0.18.2)
Requirement already satisfied: mako in ./venv/lib/python3.8/site-packages (from pyccp==0.9.0) (1.1.2)
Requirement already satisfied: MarkupSafe>=0.9.2 in ./venv/lib/python3.8/site-packages (from mako->pyccp==0.9.0) (1.1.1)
Building wheels for collected packages: pyccp
  Building wheel for pyccp (setup.py) ... done
  Created wheel for pyccp: filename=pyccp-0.9.0-py3-none-any.whl size=12530 sha256=eefc6ee6fa34d4e46ec97def9eaf8dc2bc421fe1b551468beea123573e00fa9d
  Stored in directory: /tmp/pip-ephem-wheel-cache-yqkh98oc/wheels/de/f1/d5/5e0a299b10e72919fabce83a96c02790d1d42ad697c402e80a
Successfully built pyccp
Installing collected packages: pyccp
  Attempting uninstall: pyccp
    Found existing installation: pyccp 0.9.0
    Uninstalling pyccp-0.9.0:
      Successfully uninstalled pyccp-0.9.0
Successfully installed pyccp-0.9.0
<module 'pyccp' from '/home/altendky/repos/pyccp/pyccp/__init__.py'>
<module 'pyccp.ccp' from '/home/altendky/repos/pyccp/pyccp/ccp.py'>
<module 'pyccp' from '/home/altendky/repos/pyccp/venv/lib/python3.8/site-packages/pyccp/__init__.py'>
<module 'pyccp.ccp' from '/home/altendky/repos/pyccp/venv/lib/python3.8/site-packages/pyccp/ccp.py'>
/home/altendky/repos/pyccp

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 this pull request may close these issues.

2 participants