Skip to content
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

Should python-daemon be a required package for installing the SSM via the setup.py script? #70

Closed
gregcorbett opened this issue May 22, 2018 · 3 comments
Assignees
Labels

Comments

@gregcorbett
Copy link
Member

Currently it's only an optional requirement in setup.py but a hard requirement in apel-ssm.spec.

@gregcorbett
Copy link
Member Author

If it remains an optional requirement in setup.py, L61 should be changed to:

'receiver': ['python-daemon'],

as it seems pip ignores extras with special characters, i.e. - (pypa/pip#3810 and pypa/pip#4037).

Examples below.

$ grep -A 2 "extras_require" setup.py
          extras_require={
              'python-daemon': ['python-daemon'],
          },

$ sudo pip install apel-ssm[python-daemon]
Requirement already satisfied (use --upgrade to upgrade): apel-ssm[python-daemon] in /usr/lib/python2.7/site-packages/apel_ssm-2.2.0-py2.7.egg
  apel-ssm 2.2.0 does not provide the extra 'python-daemon'
$ grep -A 2 "extras_require" setup.py
          extras_require={
              'receiver': ['python-daemon'],
          },

$ sudo pip install apel-ssm[receiver]
Requirement already satisfied (use --upgrade to upgrade): apel-ssm[receiver] in /usr/lib/python2.7/site-packages/apel_ssm-2.2.0-py2.7.egg
...
Installing collected packages: python-daemon
Successfully installed python-daemon-2.1.2

@tofu-rocketry
Copy link
Member

I guess we should follow what @jrha says for this kind of thing - if a package is optional then it shouldn't be a requirement and, as there's no consistent way of handling optionals across packaging systems, then it should just be left out.

The flip side of this is that we probably need better exception handling if the packages are missing when an attempt is made to use the parts of our software that do need those packages.

@gregcorbett
Copy link
Member Author

Closing this issue as my question has been answered. Opened #80 to document that a change should be made.

@tofu-rocketry tofu-rocketry closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants