Hi!
I am having problems deploying new package versions to PyPI:
https://travis-ci.com/github/spinlud/py-linkedin-jobs-scraper/jobs/430957329
In the build I can see the following error (expanding Deploying application
):
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.6.7/bin/twine", line 8, in <module>
sys.exit(main())
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/twine/__main__.py", line 28, in main
result = cli.dispatch(sys.argv[1:])
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/twine/cli.py", line 80, in dispatch
main = registered_commands[args.command].load()
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2446, in load
self.require(*args, **kwargs)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2469, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pkg_resources/__init__.py", line 775, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (importlib-metadata 0.18 (/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages), Requirement.parse('importlib-metadata>=1; python_version < "3.8"'), {'keyring'})
dist/linkedin-jobs-scraper-1.2.2.tar.gz already exists, no checkout
linkedin_jobs_scraper.egg-info/PKG-INFO already exists, no checkout
linkedin_jobs_scraper.egg-info/SOURCES.txt already exists, no checkout
linkedin_jobs_scraper.egg-info/dependency_links.txt already exists, no checkout
linkedin_jobs_scraper.egg-info/requires.txt already exists, no checkout
linkedin_jobs_scraper.egg-info/top_level.txt already exists, no checkout
error: could not restore untracked files from stash
The stash entry is kept in case you need it again.
PyPI upload failed.
failed to deploy
This line in particular states there is a version conflict:
pkg_resources.ContextualVersionConflict: (importlib-metadata 0.18 (/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages), Requirement.parse('importlib-metadata>=1; python_version < "3.8"'), {'keyring'})
but I am not sure how to solve this. I have no problems on building and uploading the package from local, this issue happens only with the Travis pipeline.
This is the .travis.yml
:
sudo: required
services:
- docker
language: python
python:
- '3.6'
install:
- pip install -r requirements.txt
jobs:
include:
- stage: test
script: ./tests/run_tests.sh
- stage: deploy
script:
- python setup.py install_egg_info sdist bdist_wheel
deploy:
provider: pypi
username: '__token__'
password: $PYPI_TOKEN
on:
branch: master
stages:
- test
- deploy
Anyone has any idea on how to fix this issue?