Closed bsdz closed 3 years ago
- I tried a few
poetry
commands but something seems wrong: $ poetry build [RuntimeError] The Poetry configuration is invalid:
Do you know which version of poetry you have installed? I've got 1.1.4 (poetry -V)
- could you please fix the flake8 errors in
build.py
?
Not sure if they're resolved now. I've sorted the import order and removed the forgotten prints.
- please squash your commits in one single commit
Think this can be handled on merge in github.
Regarding pinning minimum versions. I've set them to values in my fork that work well for an experimental example script in another project of mine. The example script is not really the main purpose of my library. I feel best if you find the right minimum versions for python and various dependencies. You can see what wildcards poetry supports here.
Sorry if that might come across as lazy. This PR was more of a suggestion (albeit works for me in my fork). Thanks for pypotrace btw. It has been helpful.
- I tried a few
poetry
commands but something seems wrong: $ poetry build [RuntimeError] The Poetry configuration is invalid:Do you know which version of poetry you have installed? I've got 1.1.4 (poetry -V)
I reinstalled poetry properly and getting another error with 1.1.4 now:
$ poetry build
Building potrace (0.2)
- Building sdist
- Built potrace-0.2.tar.gz
- Building wheel
A setup.py file already exists. Using it.
Traceback (most recent call last):
File "/home/flupke/tmp/pypotrace/setup.py", line 28, in <module>
from build import *
File "/home/flupke/tmp/pypotrace/build.py", line 7, in <module>
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
CalledProcessError
Command '['/home/flupke/.virtualenvs/pypotrace/bin/python', '/home/flupke/tmp/pypotrace/setup.py', 'build', '-b', '/home/flupke/tmp/pypotrace/build']' returned non-zero exit status 1.
at ~/.pyenv/versions/3.7.6/lib/python3.7/subprocess.py:363 in check_call
359│ if retcode:
360│ cmd = kwargs.get("args")
361│ if cmd is None:
362│ cmd = popenargs[0]
→ 363│ raise CalledProcessError(retcode, cmd)
364│ return 0
365│
366│
367│ def check_output(*popenargs, timeout=None, **kwargs):
- could you please fix the flake8 errors in
build.py
?Not sure if they're resolved now. I've sorted the import order and removed the forgotten prints.
You can give flake8 the file to check directly:
$ pip install flake8
$ flake8 build.py
- please squash your commits in one single commit
Think this can be handled on merge in github.
Sure, but I'm not supposed to write commit messages for you :)
Regarding pinning minimum versions. I've set them to values in my fork that work well for an experimental example script in another project of mine. The example script is not really the main purpose of my library. I feel best if you find the right minimum versions for python and various dependencies. You can see what wildcards poetry supports here.
Caret requirements are a form of version pinning, here how they translate in setup.py:
['Pillow>=8.0.1,<9.0.0', 'numpy>=1.19.4,<2.0.0']
To completely unpin you can use wildcards:
numpy = *
Sorry if that might come across as lazy. This PR was more of a suggestion (albeit works for me in my fork). Thanks for pypotrace btw. It has been helpful.
No worries I understand, unfortunately I don't have a lot of time myself to dedicate to this project. That's too bad because with just a little bit of efforts I could have merged your PR :)
Thanks for a great project. I notice it's a bit tricky to install this package as a dependency in another project as it requires numpy and also needs Cython to build. I also noticed you've built a special wrapper around setuptools to handle compiling the cython code.
This PR offers a possible alternative using poetry and it's build api. This means you can simply do:
And the rest is taken care for you (cythonize, compile, etc). It removes setup.py, setup.cfg and cysetuptools.py and replaces them with pyproject.toml and build.py file.
This is just a suggestion and could perhaps do with a little extra bells & whistles.