Comments (4)
Oh, many thanks for reporting this. It was working without a glitch for a while, so it would take me a while to realize it was not working correctly. 😄
from plugincompat.
Hey,
I did take a look at the problem, but it seems the solution is more complicated than I thought, seems to be a problem on how tox handles the --force-dep
option. This might take awhile.
Thanks again for the report! 😄
from plugincompat.
Can you elaborate on what's the problem? --force-dep
doesn't seem related to that weird error about requirements.txt
from plugincompat.
Sure!
From the stack trace:
File "/home/travis/virtualenv/python2.7.9/src/tox/tox/_config.py", line 374, in _makeenvconfig
name = self._replace_forced_dep(name, config)
File "/home/travis/virtualenv/python2.7.9/src/tox/tox/_config.py", line 432, in _replace_forced_dep
if self._is_same_dep(forced_dep, name):
File "/home/travis/virtualenv/python2.7.9/src/tox/tox/_config.py", line 443, in _is_same_dep
dep2_name = pkg_resources.Requirement.parse(dep2).project_name
The problem lies in constructing the pkg_resources.Requirement.parse
object, which is used when the --force-dep
option is passed. This happens when a plugin lists its dependencies using a requirements.txt
file like this:
[testenv]
deps = -r{toxinidir}/requirements-testing.txt
Instead of defining them explicitly:
[testenv]
deps = foo==1.0
bar>1.2
In this case "-r /path/to/requirements.txt"
is being passed instead of a project version requirement to pkg_resources.Requirement.parse
. I didn't looked in the problem too deeply, but it seems like tox
in the normal workflow just forwards deps
to pip install
machinery, but when the --force-dep
option is passed it actually tries to parse dependencies to find the one to substitute versions and breaks. And that is my fault as I wrote support for --force-dep
. 😄
The correct solution would be to parse the requirements (using pkg_resources
), but hadn't have time to look at it yet as I was on vacation. But I will try to get to this next week.
Cheers,
from plugincompat.
Related Issues (20)
- Use tox in verbose mode HOT 2
- Move to pytest-dev organisation HOT 1
- not enough information to fix: "<no output available>" HOT 1
- Allow any package to advertise itself as a plugin HOT 13
- Update script is returning empty results HOT 1
- tox.ini dependencies not being recognized for pytest-mpl HOT 3
- Change column order
- update_index.py fails when plugin doesn't publish any release HOT 1
- Freeze requirements txt HOT 2
- Why restricted to sdist? HOT 8
- Outdated info HOT 3
- List the tox environments for each package instead of assuming 'py27' and 'py37' exist HOT 1
- Consider just displaying the plugin badge and metadata HOT 1
- pytest-4.6.0: 0 plugins HOT 1
- Try to weed out "Framework :: Pytest" false-positives HOT 3
- Add guide on how to run flask app locally for development HOT 2
- pypi querry in update_index.py is affected by ratelimit changes HOT 1
- Migrate from xmlrpc to PyPIJSON HOT 1
- Retire plugincompat
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugincompat.