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

Publish to PyPI #95

Open
astrochun opened this issue Jan 5, 2021 · 1 comment
Open

Publish to PyPI #95

astrochun opened this issue Jan 5, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@astrochun
Copy link
Owner

To allow for easier installation, let's move to publishing it on PyPI. msc is already taken so I'll need to come up with an easier package name.

Will need to test with virtualenv to ensure it installs all that is needed.

@astrochun astrochun added the enhancement New feature or request label Jan 5, 2021
@astrochun astrochun added this to the v1.4.0 milestone Jan 5, 2021
@astrochun astrochun self-assigned this Jan 5, 2021
@astrochun
Copy link
Owner Author

There are some issues with packaging. Unfortunately it isn't able to find the sub-packages.

In [1]: from Metallicity_Stack_Commons import version                                                                   
version

In [2]: version                                                                                                         
Out[2]: '1.2.0-2'

In [3]: from Metallicity_Stack_Commons.analysis import attenuation                                                      
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-45f14df66205> in <module>
----> 1 from Metallicity_Stack_Commons.analysis import attenuation

ModuleNotFoundError: No module named 'Metallicity_Stack_Commons.analysis'

I came across a few suggestions but it doesn't seem to work:

  1. Adding recursive-include in MANIFEST.in included things but not in the final build it seems
  2. I believe the path with minimal changes to the structure is a pkgutil-style __init__.py. See this. However this will require that I re-package the common imports.

Here's the latest sdist log:

sudo python setup.py sdist bdist_wheel
Password:
/Applications/anaconda3/lib/python3.7/site-packages/setuptools/dist.py:475: UserWarning: Normalizing '1.2.0-3' to '1.2.0.post3'
  normalized_version,
running sdist
running egg_info
writing msc_astro.egg-info/PKG-INFO
writing dependency_links to msc_astro.egg-info/dependency_links.txt
writing requirements to msc_astro.egg-info/requires.txt
writing top-level names to msc_astro.egg-info/top_level.txt
reading manifest file 'msc_astro.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'msc_astro.egg-info/SOURCES.txt'
running check
creating msc-astro-1.2.0.post3
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/others
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/others/__pycache__
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/plotting
creating msc-astro-1.2.0.post3/Metallicity_Stack_Commons/plotting/__pycache__
creating msc-astro-1.2.0.post3/msc_astro.egg-info
copying files to msc-astro-1.2.0.post3...
copying LICENSE -> msc-astro-1.2.0.post3
copying MANIFEST.in -> msc-astro-1.2.0.post3
copying README.md -> msc-astro-1.2.0.post3
copying setup.py -> msc-astro-1.2.0.post3
copying Metallicity_Stack_Commons/__init__.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/__init__.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/column_names.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/column_names.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/logging.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/update_det4363_info.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/valid_table.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons
copying Metallicity_Stack_Commons/__pycache__/__init__.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/attenuation.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/column_names.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/error_prop.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/fitting.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/logging.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/ratios.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/temp_metallicity_calc.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/__pycache__/valid_table.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/__pycache__
copying Metallicity_Stack_Commons/analysis/__init__.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/__init__.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/attenuation.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/attenuation.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/composite_indv_detect.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/error_prop.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/error_prop.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/fitting.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/ratios.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/ratios.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/temp_metallicity_calc.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/temp_metallicity_calc.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis
copying Metallicity_Stack_Commons/analysis/__pycache__/__init__.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
copying Metallicity_Stack_Commons/analysis/__pycache__/attenuation.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
copying Metallicity_Stack_Commons/analysis/__pycache__/error_prop.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
copying Metallicity_Stack_Commons/analysis/__pycache__/fitting.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
copying Metallicity_Stack_Commons/analysis/__pycache__/ratios.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
copying Metallicity_Stack_Commons/analysis/__pycache__/temp_metallicity_calc.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/analysis/__pycache__
copying Metallicity_Stack_Commons/others/__init__.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/others
copying Metallicity_Stack_Commons/others/extract_deep2_data.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/others
copying Metallicity_Stack_Commons/others/__pycache__/__init__.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/others/__pycache__
copying Metallicity_Stack_Commons/others/__pycache__/extract_deep2_data.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/others/__pycache__
copying Metallicity_Stack_Commons/plotting/__init_.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/plotting
copying Metallicity_Stack_Commons/plotting/balmer.py -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/plotting
copying Metallicity_Stack_Commons/plotting/__pycache__/balmer.cpython-37.pyc -> msc-astro-1.2.0.post3/Metallicity_Stack_Commons/plotting/__pycache__
copying msc_astro.egg-info/PKG-INFO -> msc-astro-1.2.0.post3/msc_astro.egg-info
copying msc_astro.egg-info/SOURCES.txt -> msc-astro-1.2.0.post3/msc_astro.egg-info
copying msc_astro.egg-info/dependency_links.txt -> msc-astro-1.2.0.post3/msc_astro.egg-info
copying msc_astro.egg-info/requires.txt -> msc-astro-1.2.0.post3/msc_astro.egg-info
copying msc_astro.egg-info/top_level.txt -> msc-astro-1.2.0.post3/msc_astro.egg-info
Writing msc-astro-1.2.0.post3/setup.cfg
Creating tar archive
removing 'msc-astro-1.2.0.post3' (and everything under it)
running bdist_wheel
running build
running build_py
copying Metallicity_Stack_Commons/__init__.py -> build/lib/Metallicity_Stack_Commons
installing to build/bdist.macosx-10.9-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.9-x86_64/wheel
creating build/bdist.macosx-10.9-x86_64/wheel/Metallicity_Stack_Commons
copying build/lib/Metallicity_Stack_Commons/logging.py -> build/bdist.macosx-10.9-x86_64/wheel/Metallicity_Stack_Commons
copying build/lib/Metallicity_Stack_Commons/column_names.py -> build/bdist.macosx-10.9-x86_64/wheel/Metallicity_Stack_Commons
copying build/lib/Metallicity_Stack_Commons/__init__.py -> build/bdist.macosx-10.9-x86_64/wheel/Metallicity_Stack_Commons
copying build/lib/Metallicity_Stack_Commons/update_det4363_info.py -> build/bdist.macosx-10.9-x86_64/wheel/Metallicity_Stack_Commons
copying build/lib/Metallicity_Stack_Commons/valid_table.py -> build/bdist.macosx-10.9-x86_64/wheel/Metallicity_Stack_Commons
running install_egg_info
Copying msc_astro.egg-info to build/bdist.macosx-10.9-x86_64/wheel/msc_astro-1.2.0.post3-py3.7.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.macosx-10.9-x86_64/wheel/msc_astro-1.2.0.post3.dist-info/WHEEL
creating 'dist/msc_astro-1.2.0.post3-py3-none-any.whl' and adding 'build/bdist.macosx-10.9-x86_64/wheel' to it
adding 'Metallicity_Stack_Commons/__init__.py'
adding 'Metallicity_Stack_Commons/column_names.py'
adding 'Metallicity_Stack_Commons/logging.py'
adding 'Metallicity_Stack_Commons/update_det4363_info.py'
adding 'Metallicity_Stack_Commons/valid_table.py'
adding 'msc_astro-1.2.0.post3.dist-info/LICENSE'
adding 'msc_astro-1.2.0.post3.dist-info/METADATA'
adding 'msc_astro-1.2.0.post3.dist-info/WHEEL'
adding 'msc_astro-1.2.0.post3.dist-info/top_level.txt'
adding 'msc_astro-1.2.0.post3.dist-info/RECORD'
removing build/bdist.macosx-10.9-x86_64/wheel

@astrochun astrochun removed this from the v1.4.0 milestone Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant