-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactoring of setup.py #1282
Refactoring of setup.py #1282
Conversation
I'm happy with all the changes except for moving the requirements inside setup.py. If you can revert that commit, I'll merge this in. For now, moving it inside setup.py makes it harder to update and we're having that discussion elsewhere. Can also merge in master into this branch? |
Ok, I'm cherry-picking 7ab8bd9 and 1ca945f on top of the current okfn:master and updating PR.
How so? I moved them inside setup.py to make it easier to update... this sounds strange to me. With "vanilla" version, I have to do:
While, when having requirements in setup.py, installing/upgrading is just matter of a Actually, I use a local repository with tarballs of dependencies, so I use this:
while, with requirements in setup.py, I could remove the |
No, no. I meant makes the requirements list itself harder to update and freeze. I don't really have a solid reason to give you, to be honest. It's just we're all little weary of having them in setup.py. We also have multiple sets of requirements.txt and putting them in setup.py makes it harder, for instance to just generate documentation without installing CKAN. If we pin something in setup.py its like saying it has to be that version, when in all likelihood a later version would work, but we a have just not tested it yet. Again, I understand these are not concrete reasons. The general feeling in the team is that we'd prefer the flexibility offered by using requirements.txt files. If you can fix the pull requests with just the other two commits, I'll merge it in right away. |
* Some pep8 fixes * Entry points converted in dictionary format
Ok, here it is a new commit, based on top of the current master, with only the pep8/entry_points changes. |
For the requirements thing: most applications put (loosely pinned) dependencies in setup.py and dependencies for development/tests in setup(
...
install_requires=[
'Pylons==0.9.7',
'SQAlchemy >= 0.7, <0.8',
...
],
extras_require={
'devel': ['docutils', 'pep8', ...],
'docs': ['sphinx'],
},
...
) Pinning is good as you are sure the installed version is the right one, but it has drawbacks, such as conflicts in case, for example, a plugin uses another pinned version, so good practice is to pin just a major/minor version, when needed. |
I refactored setup.py a bit:
install_requires
, so you can justpython setup.py install
orpip install git+https://github.com/rshk/ckan.git
.