berndporr / py-ecg-detectors

Popular ECG QRS detectors written in python
GNU General Public License v3.0
353 stars 82 forks source link

Don't require pathlib for Python >= 3.4 #1

Closed cbrnr closed 5 years ago

cbrnr commented 5 years ago

Python >= 3.4 ships pathlib with its standard library. Furthermore, the pathlib package on PyPI is not maintained anymore. Instead, they recommend to use the pathlib2 package. Therefore, the entry in setup.py should be modified as follows (https://stackoverflow.com/a/32643122/1112283):

'pathlib2;python_version<"3.4"'

The package import should then also be changed to something along the following lines:

try:
    import pathlib
except ImportError:
    import pathlib2 as pathlib