You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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 @Galyna Zholtkevych 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.
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.
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.