pip-check icon indicating copy to clipboard operation
pip-check copied to clipboard

Enable utilization as module

Open abejenaru opened this issue 2 years ago • 5 comments

abejenaru avatar Apr 08 '24 11:04 abejenaru

Could you explain the reason behind this?

bartTC avatar Apr 08 '24 12:04 bartTC

Could you explain the reason behind this?

This allows to also run pip-check as a python module (e.g python -m pip_check), and doesn't break running it as a package. I'm using python in a locked Windows environment, where running packages directly is restricted.

abejenaru avatar Apr 09 '24 07:04 abejenaru

I'll give it some more tests regarding the pypi build and merge soon.

bartTC avatar Apr 09 '24 07:04 bartTC

It doesn't look like the package itself is going to get build. You can test this by running tox.

py311: commands[1]> pip-check
Traceback (most recent call last):
  File "/private/tmp/tox/pip-check/py311/bin/pip-check", line 5, in <module>
    from pip_check import main
ImportError: cannot import name 'main' from 'pip_check' (/private/tmp/tox/pip-check/py311/lib/python3.11/site-packages/pip_check/__init__.py)
py311: exit 1 (0.16 seconds) /Users/martin/Workspace/pip-check> pip-check pid=32760

bartTC avatar Apr 12 '24 06:04 bartTC

Noted, I will run the full test suite

abejenaru avatar Apr 12 '24 09:04 abejenaru

Closing this due to staleness.

bartTC avatar Aug 18 '24 04:08 bartTC