Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tox with PEP 517 #176

Closed
konstin opened this issue Aug 11, 2019 · 8 comments
Closed

Tox with PEP 517 #176

konstin opened this issue Aug 11, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@konstin
Copy link
Member

konstin commented Aug 11, 2019

Tox fails when using pyo3-pack through PEP 517 due to tox-dev/tox#1344.

@konstin konstin added bug Something isn't working blocked Something is blocking this labels Aug 11, 2019
@KeironO
Copy link

KeironO commented Aug 12, 2019

Would it be possible to get an estimate of how long it'll take for this to be fixed? If it's not high on your priority list, is there any way in which I can make a workaround for this?

@thedrow
Copy link

thedrow commented Sep 2, 2019

Now I have a new problem...
This is my pyproject.toml:

[build-system]
requires = ["maturin"]
build-backend = "maturin"

This is my tox.ini:

# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py35, py36, py37, pypy3
isolated_build = True

[testenv]
deps =
    pytest>=5.0
    pytest-benchmark
    hypothesis
commands =
    pytest -vvvv

When I try to invoke tox I get:

.package recreate: /home/omer/Documents/Projects/fastuuid/.tox/.package
.package installdeps: maturin
ERROR: invocation failed (exit code 1), logfile: /home/omer/Documents/Projects/fastuuid/.tox/.package/log/.package-2.log
=================================================== log start ===================================================
Traceback (most recent call last):
  File "/home/omer/.local/share/virtualenvs/fastuuid/lib/python3.7/site-packages/tox/helper/build_requires.py", line 7, in <module>
    backend = __import__(backend_spec, fromlist=[None])
ModuleNotFoundError: No module named 'maturin'

==================================================== log end ====================================================
ERROR: FAIL could not package project - v = InvocationError("/home/omer/Documents/Projects/fastuuid/.tox/.package/bin/python /home/omer/.local/share/virtualenvs/fastuuid/lib/python3.7/site-packages/tox/helper/build_requires.py maturin ''", 1)

The package can be installed and I'm using it to build the shared library as expected.
Any idea?

@konstin
Copy link
Member Author

konstin commented Sep 5, 2019

@thedrow I forgot to also rename the pyo3_pack directory which I've fixed in 04206b9. With that commit the old error message should return.

@thedrow
Copy link

thedrow commented Sep 6, 2019

Can you release a new version?

@konstin
Copy link
Member Author

konstin commented Sep 6, 2019

It's already released

@davidhewitt
Copy link
Member

FYI as of tox 3.18.1 the issue should be resolved in tox. From local testing when writing maturing examples for pyo3 I think we need #336 to be merged, and then we should be good to update the readme!

@konstin konstin removed the blocked Something is blocking this label Jul 29, 2020
@konstin
Copy link
Member Author

konstin commented Jul 29, 2020

I've tested an it works now, however testing locally is tedious due to tox-dev/tox#1634. I'll update the examples

@konstin
Copy link
Member Author

konstin commented Jul 29, 2020

@davidhewitt Thank you very much for fixing the original bug in tox!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants