Closed cdeil closed 8 years ago
We could. But it is not necessary:
python setup.py {build,install}
doesn't pull dependencies, so install_requires
is not necessary. pip install
works correctly: it install six as requested.Probably the best solution is a try/except block: if setuptools
exists use it, otherwise use distutils
The official Python packaging recommendation is to use setuptools
:
https://packaging.python.org/en/latest/current.html#packaging-tool-recommendations
I'm not a packaging expert, but I think setuptools provides several goodies like e.g. making it easy to integrate the test runner and docs build via setup.py, and I think (but am not sure) it would be painful to do this with distutils
.
https://pytest.org/latest/goodpractises.html#integration-with-setuptools-test-commands
Of course it's not a necessity, but all Astropy affiliated packages do this, i.e. this works:
python setup.py test
python setup.py build_sphinx
i.e. it's easy and quick for Astropy devs like me to get started contributing to pyds9
if we set it up the same way.
@cdeil: thanks for the links. I'm looking into moving to setuptools
.
The only catch is that there is not clean
module there. On the other end:
1) pip copy the package in a temporary directory and build it there
2) python setup.py build
should build into build
directory not touching the source directories.
I think that xpa library now is built in the xpa
directory
Leave some time to figure out how to deal with it. I'll do a PR.
python setup.py test
This I know
python setup.py build_sphinx
I think that I'll "borrow" it for my projects
this might come for free while dealing with #19
this is mostly done as part of #24. There are still few details to figure out, though.
The PR #28 should address and solve this
Done
I'm getting this warning:
@montefra – I think it's because
pyds9
usesdistutils
, and the solution is to switch to setuptools?