from setuptools import setup, find_packages
from pathlib import Path
import numpy as np
import versioneer

req_path = Path('requirements.txt')
if not req_path.is_file():
    req_path = Path('scvelo.egg-info') / req_path
with req_path.open() as requirements:
    requires = [l.strip() for l in requirements]

setup(
    name="scvelo",
    version=versioneer.get_version(),
    cmdclass=versioneer.get_cmdclass(),
    install_requires=requires,
    packages=find_packages(),
    include_dirs=[np.get_include()],
    author="Volker Bergen",
    author_email="volker.bergen@helmholtz-muenchen.de",
    description='Stochastic RNA velocity for inferring single cell dynamics',
    license='BSD',
    url="https://github.com/VolkerBergen/scvelo",
    download_url=f"https://github.com/VolkerBergen/scvelo",
    keywords=["RNAseq", "singlecell", "stochastic", "velocity", "transcriptomics"]
    )

@@ -100,16 +100,44 @@
 ioneer%0A%0A
+HERE = Path(__file).parent%0A%0A
 req_path
@@ -139,21 +139,23 @@
 _path = 
-Path(
+HERE / 
 'require
@@ -164,17 +164,16 @@
 nts.txt'
-)
 %0Aif not 
@@ -246,93 +246,117 @@
 ath%0A
-with req_path.open() as requirements:%0A    requires = %5Bl.strip()
+requires = %5B%0A    'scanpy' if 'theislab/scanpy' in r else r%0A   
  for 
-l
+r
  in req
-uirements
+_path.read_text().strip().split()%0A
 %5D%0A%0As

fix requirements for setup.py