#78 publish ResultsDB package to PyPI
Closed: Invalid by jskladan. Opened by mjia.

Since ResultsDB is written in Python, I do not see any reason why it is not published to PyPi. This will make our life easier as we're using it as a test dependency and expecting to install it with pip.


@mjia, I don't have any fundamental issues with it, apart of the fact that it adds yet another place to store/track deps.

@mjia BTW what exactly is your use-case, and why is installing from repos not OK for you? I'm asking for two reasons
1) packaging resultsdb for PyPi is proving to be rather a PITA
2) if you actually need to use resultsdb, setup is necessary - like creating the database, for example - since you are going to need to solve this too (probably are right now anyway) is installing from repos (aka another line in that script that you'll have to have to setup resultsdb anyway) a problem?

After spending quite some time on this, I'm not really willing to go much further without understanding what, and why exactly you need. Ideally submit a diff for review that packages the resultsdb for PyPi in such a way, that suits what you need, and we can start discussing it.

for future ref, the reasonable way to get around syncing requirements.txt and setup.py is adding:

+ with open('requirements.txt') as fd:
+     install_requires = [l.strip() for l in fd.readlines() if l.strip() and not l.strip().startswith('#>
...
+       install_requires=install_requires,

to setup.py

@jskladan , we're expecting the developers to set up a development enviroment with pip in a python virtualenv[1]. What we want is to be able to do this[2] when ResultsDB is installed with pip.
I will commit some time to sumibt a patch.

[1] https://pagure.io/greenwave
[2] https://pagure.io/greenwave/blob/master/f/functional-tests/conftest.py#_46

I do not think we should sync requirements.txt into setup.py. We only need some of the packages in the requirements.txt, not all of them.
Also, it is not a best pratice to pin dependencies to specific versions for install_requires. I would rather do something like this
install_requires=[
'fedmsg',
'alembic'
...
]

If there is a long list of packages for the dependencies, it would be worth considering.

Metadata Update from @jskladan:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

Metadata