Stop requiring ankirspy while running on development because

maturin develop hides the package from pip
https://github.com/PyO3/maturin/issues 304
This commit is contained in:
evandrocoan 2020-04-30 23:07:47 -03:00
parent a48fa4ad87
commit b19b3a6706
2 changed files with 7 additions and 3 deletions

View file

@ -32,7 +32,7 @@ PHONY: all
all: check all: check
.build/run-deps: setup.py .build/run-deps: setup.py
python -m pip install -e . SKIP_ANKI_RSPY=true python -m pip install -e .
@touch $@ @touch $@
.build/dev-deps: requirements.dev .build/dev-deps: requirements.dev
@ -117,7 +117,7 @@ anki/buildinfo.py: ../meta/version ../meta/buildhash
VER := $(shell cat ../meta/version) VER := $(shell cat ../meta/version)
.build/vernum: ../meta/version .build/vernum: ../meta/version
sed -i.bak 's/.*automatically updated 1.*/ "ankirspy==$(VER)", # automatically updated 1/' setup.py sed -i.bak 's/.*automatically updated 1.*/ install_requires.append("ankirspy==$(VER)") # automatically updated 1/' setup.py
sed -i.bak 's/.*automatically updated 2.*/ version="$(VER)", # automatically updated 2/' setup.py sed -i.bak 's/.*automatically updated 2.*/ version="$(VER)", # automatically updated 2/' setup.py
rm setup.py.bak rm setup.py.bak
@touch $@ @touch $@

View file

@ -1,5 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os
import setuptools import setuptools
install_requires = [ install_requires = [
@ -7,12 +9,14 @@ install_requires = [
"requests", "requests",
"decorator", "decorator",
"protobuf", "protobuf",
"ankirspy==2.1.25", # automatically updated 1
'orjson; platform_machine == "x86_64"', 'orjson; platform_machine == "x86_64"',
'psutil; sys_platform == "win32"', 'psutil; sys_platform == "win32"',
'distro; sys_platform != "darwin" and sys_platform != "win32"', 'distro; sys_platform != "darwin" and sys_platform != "win32"',
] ]
# maturin develop hides the package from pip - https://github.com/ankitects/anki/pull/600
if not os.environ.get("SKIP_ANKI_RSPY", False):
install_requires.append("ankirspy==2.1.25") # automatically updated 1
setuptools.setup( setuptools.setup(
name="anki", name="anki",