Skip to content

odclib as an optional dependency #38

Description

@juntyr

Is your feature request related to a problem? Please describe.

pyodc contains both the pure Python pyodc and the extension codc packages. Since v1.6.0, pyodc now depends (unconditionally) on the odclib package, which is only required for codc.

Describe the solution you'd like

odclib should be made an optional dependency so that one can install the wheel from PyPi

Describe alternatives you've considered

It would be even better to package pyodc and codc separately so that pyodc can be installed without ever requiring odclib, and installing codc always requires installing odclib.

Since many end users have the following code (or variations of it):

try:
    import codc as odc
except:
    import pyodc as odc

one could also unify both in a new odc package that just exports everything from either codc or pyodc. This package could then have an optional dependency on codc.

Several other projects that have both a pure Python implementation and a faster C implementation usually just publish one package that uses the C path if available and otherwise falls back to the pure Python one silently (or perhaps with a warning or log message) so that the end user doesn't need to handle the switch.

Additional context

No response

Organisation

University of Helsinki

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions