I'm trying to publish a python package but build fails on pipe
My package requires requests and pytz so, on setup.py I have install_requires=['requests', 'pytz']
The atlassian/pypi-publish:0.3.1 image can't find pytz module so, how I can handle this?
follow Python Packaging guide https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives
and use appropriate DISTRIBUTIONS.
Like
Hey @Halyna Berezovska thanks for the reply but it will not help.
I already following this exactly Python Package guide and have the DISTRIBUTION set on my bitbucket-pipelines.yml. Using a python venv without pytz, the behavior is the same when I ran "python setup.py " ModuleNotFoundError: No module named 'pytz'
Since pytz and requests are needed, I need to install it on pypi-publish before pipe.py run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try to run
python setup.py install
or
python setup.py develop
instead, before using the pipe publishing. This should install needed things.
I have tested this with pytz also and with other packages and this works for our repository also where we publish package with dependencies.
E.g.
deploy: &deploy
step:
name: Deploy to PyPI
script:
- python setup.py install
- pipe: atlassian/pypi-publish:0.2.3
variables:
PYPI_USERNAME: $USERNAME
PYPI_PASSWORD: $PASSWORD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@diego.magalhaes if doesn't , please share full logs, we'll try to investigate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found a way to solve this problem before your reply. The pipe was removed from yaml and I used twine to upload and it directly so:
script:
- export BUILD_VERSION=${BITBUCKET_TAG}
- pip install twine requests pytz
- python setup.py sdist bdist_wheel
- twine check dist/*
- twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
Thank's for your support!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.