Skip to content

Commit

Permalink
Merge pull request #600 from evandroforks/add_missing_wheels_anki_dep…
Browse files Browse the repository at this point in the history
…endency

Add missing aqt and anki modules dependency requirements
  • Loading branch information
dae authored May 1, 2020
2 parents d7cdb10 + b6e7ab6 commit 0080db4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
5 changes: 3 additions & 2 deletions pylib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $@
7 changes: 6 additions & 1 deletion pylib/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os

import setuptools

install_requires = [
Expand All @@ -12,10 +14,13 @@
'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",
Expand Down
3 changes: 2 additions & 1 deletion qt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
3 changes: 2 additions & 1 deletion qt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ def package_files(directory):
"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",
Expand Down
12 changes: 8 additions & 4 deletions rspy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0080db4

Please sign in to comment.