Closed pomkos closed 3 years ago
Switched to poetry
for all package building/publishing, they seem to have their head on straight.
That said to run with python's inbuilt python3 -m build
and then python twine upload dist/*
commands:
__init__.py
in them, locally and on githubFolder structure for default python command should be:
|-- pypi
|-- src # <---- this folder can be named pillaralgos, but still needed another pillaralgos subfolder
|-- pillaralgos # <----- this is needed
|-- helpers
|-- __init__.py
|-- data_handler.py
|-- __init__.py
|-- algoXX.py
|-- LICENSE
|-- pyproject.toml
|-- README.md
|-- setup.cfg
poetry
worked out of the box. Folder structure:
|-- pypi
|-- pillaralgos # <---- note that poetry didn't require an additional subfolder
|-- helpers
|-- __init__.py
|-- data_handler.py
|-- graph_helpers.py
|-- sanity_checks.py
|-- __init__.py # must include version number
|-- algoXX.py # all algorithms in separate files
|-- LICENSE
|-- README.md
|-- pyproject.toml # must include version number
Replicated in brand new environments, on different machines, and the AWS lambda.
See here:
https://stackoverflow.com/questions/67035055/i-built-a-python-package-and-uploaded-to-pypi-it-can-be-installed-but-not-modul
Local install using
pip install pillaralgos-1.0.1-py3-none-any.whl
has the same issue of installing fine, but not importing in terminal console, jupyter console, or jupyterlab notebook.Note: using the pypi_reorganize branch to build the module.