diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 735353e0..a95f3c49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade --user pip --quiet - python -m pip install -r .github/workflows/test_requirements.txt + python -m pip install -r .github/workflows/test_requirements.txt -r requirements.txt python --version pip --version python -m pip list diff --git a/.github/workflows/test_requirements.txt b/.github/workflows/test_requirements.txt index f9ce7ece..396d8a22 100644 --- a/.github/workflows/test_requirements.txt +++ b/.github/workflows/test_requirements.txt @@ -1,15 +1,10 @@ numpy>=1.14,<1.18 scipy>=1.5.2 -torch==1.7.1 -torchaudio>=0.7.0 audiomentations>=0.11.0 audioread>=2.1.8 ffmpeg-python -julius>=0.2.3,<0.3 -librosa>=0.6.1,<=0.8 py-cpuinfo>=7.0.0 pytest==5.3.4 pytest-cov==2.8.1 coverage==4.5.2 PyYAML>=5.3.1 -torch-pitch-shift>=1.2.0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..71421928 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +julius>=0.2.3,<0.3 +librosa>=0.6.0 +torch>=1.7.0 +torchaudio>=0.7.0 +torch-pitch-shift>=1.2.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 7aa15b29..d34b1871 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,9 @@ def find_version(*file_paths): raise RuntimeError("Unable to find version string.") +with open("requirements.txt", "r") as f: + requirements = f.read().split("\n") + setup( name="torch-audiomentations", version=find_version("torch_audiomentations", "__init__.py"), @@ -36,13 +39,7 @@ def find_version(*file_paths): packages=find_packages( exclude=["build", "scripts", "dist", "images", "test_fixtures", "tests"] ), - install_requires=[ - "julius>=0.2.3,<0.3", - "librosa>=0.6.0", - "torch>=1.7.0", - "torchaudio>=0.7.0", - "torch-pitch-shift>=1.2.0", - ], + install_requires=requirements, extras_require={"extras": ["PyYAML"]}, python_requires=">=3.6,<3.9.6", classifiers=[