Installing opsmop via Pip on Linux doesn't work


#1

Currently the distutils setup.py only installs the opsmop package, and none of its sub-packages resulting in the entrypoint script not being able to find the opsmop.client.cli module.

Normally I use setuputils as it has the find_pakages() function so that you don't have to add all of the packages by hand, and the python packaging guide recommends the use of setuputils as well. Additionally, setuputils will allow pip to resolve dependencies on it's own. Is there any reason we wanted to avoid setuputils aside from adding a setup dependency? If we are okay with switching I would be happy to submit a PR to get installs working on Linux systems.


#2

Hi @graysonhead,

Thanks for the heads up.

I haven't spent any time working on pip installs yet so the setup.py that I have is just a stub (I have not even tried it yet). Once I have a chance to work on that there will be instructions, and this should be pretty soon. Thanks very much for reminding me about this.

All you should need to do is:

export PYTHONPATH=.
bin/opsmop --apply foo.py

And just try things out of the source checkout.

I don't see any reference to setuputils in the Python packaging guide, but I also don't think having things in setuptools is going to be a problem, the setup.py for opsmop will be exceptionally short.

opsmop is indeed the ONLY package root, and there will be probably maybe 4 bin scripts.


#3

My apologies, I have a 4 month old son that abhors the idea of me getting a reasonable amount of sleep, I meant setuptools not setuputils.

Setuptools is recommended by the python packaging guide here: https://packaging.python.org/guides/tool-recommendations/ (still confused as to why it isn't in the core Python distribution, but it is what it is.)

My personal reasons for preferring it are the ability to discover and exclude packages instead of having to manually define them, and the ability to intelligently define package dependencies (with floor versions) that pip can then resolve.

I've been playing around with the program using the workaround above, I just figure that making it easier for people to test drive would be a good thing. Admittedly it took me a little while to figure out why the distribution that I installed via PIP wasn't working.


#4

Aha! One source of confusion was you had typed "setuputils" not "setuptools" in one place, so I was responding to that in part.

Perhaps this perfectly confusing merger of distutils and setuptools needs to happen :)

Yeah, doesn't matter too much in the end, it's a really simple package either way. I'll get this done soon.