mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Merge pull request #600 from evandroforks/add_missing_wheels_anki_dependency
Add missing aqt and anki modules dependency requirements
This commit is contained in:
commit
0080db4c94
5 changed files with 21 additions and 9 deletions
|
@ -32,7 +32,7 @@ PHONY: all
|
|||
all: check
|
||||
|
||||
.build/run-deps: setup.py
|
||||
python -m pip install -e .
|
||||
SKIP_ANKI_RSPY=true python -m pip install -e .
|
||||
@touch $@
|
||||
|
||||
.build/dev-deps: requirements.dev
|
||||
|
@ -117,6 +117,7 @@ anki/buildinfo.py: ../meta/version ../meta/buildhash
|
|||
|
||||
VER := $(shell cat ../meta/version)
|
||||
.build/vernum: ../meta/version
|
||||
sed -i.bak 's/.*automatically updated.*/ version="$(VER)", # automatically updated/' 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
|
||||
rm setup.py.bak
|
||||
@touch $@
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
import setuptools
|
||||
|
||||
install_requires = [
|
||||
|
@ -12,10 +14,13 @@ install_requires = [
|
|||
'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(
|
||||
name="anki",
|
||||
version="2.1.25", # automatically updated
|
||||
version="2.1.25", # automatically updated 2
|
||||
author="Ankitects Pty Ltd",
|
||||
description="Anki's library code",
|
||||
long_description="Anki's library code",
|
||||
|
|
|
@ -144,6 +144,7 @@ aqt/buildinfo.py: ../meta/version ../meta/buildhash
|
|||
|
||||
VER := $(shell cat ../meta/version)
|
||||
.build/vernum: ../meta/version
|
||||
sed -i.bak 's/.*automatically updated.*/ version="$(VER)", # automatically updated/' setup.py
|
||||
sed -i.bak 's/.*automatically updated 1.*/ "anki==$(VER)", # automatically updated 1/' setup.py
|
||||
sed -i.bak 's/.*automatically updated 2.*/ version="$(VER)", # automatically updated 2/' setup.py
|
||||
rm setup.py.bak
|
||||
@touch $@
|
||||
|
|
|
@ -30,12 +30,13 @@ install_requires = [
|
|||
"pyqt5>=5.9",
|
||||
'psutil; sys.platform == "win32"',
|
||||
'pywin32; sys.platform == "win32"',
|
||||
"anki==2.1.25", # automatically updated 1
|
||||
]
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
name="aqt",
|
||||
version="2.1.25", # automatically updated
|
||||
version="2.1.25", # automatically updated 2
|
||||
author="Ankitects Pty Ltd",
|
||||
description="Anki's Qt GUI code",
|
||||
long_description="Anki's QT GUI code",
|
||||
|
|
|
@ -41,6 +41,10 @@ RSPY_TARGET_DIR ?= target
|
|||
QT_FTL_TEMPLATES := ../qt/ftl
|
||||
QT_FTL_LOCALES := ../qt/ftl/repo/desktop
|
||||
|
||||
BUILD_VARIABLES = FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" \
|
||||
FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \
|
||||
CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)"
|
||||
|
||||
.PHONY: all develop build check fix clean
|
||||
|
||||
all: develop
|
||||
|
@ -56,16 +60,16 @@ DEPS := .build/tools .build/vernum ../meta/buildhash \
|
|||
|
||||
.build/develop: $(DEPS)
|
||||
touch ../proto/backend.proto
|
||||
FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \
|
||||
CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin develop $(DEVFLAGS)
|
||||
${BUILD_VARIABLES} \
|
||||
maturin develop $(DEVFLAGS)
|
||||
touch $@
|
||||
|
||||
build: .build/build
|
||||
|
||||
.build/build: $(DEPS)
|
||||
touch ../proto/backend.proto
|
||||
FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \
|
||||
CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin build -i "${PYTHON_FILE}" -o "$(OUTDIR)" $(BUILDFLAGS)
|
||||
${BUILD_VARIABLES} \
|
||||
maturin build -i "${PYTHON_FILE}" -o "$(OUTDIR)" $(BUILDFLAGS)
|
||||
touch $@
|
||||
|
||||
check: .build/check
|
||||
|
|
Loading…
Reference in a new issue