Set to build a source distribution instead of build distribution

for aqt on qt/Makefile, because .whl files are just zip simple
zip files and do not support dynamic versioning. Also, there is no
restriction for aqt to be shipped as source tarball because it does
not ship any binaries.
This commit is contained in:
evandrocoan 2020-03-31 00:26:53 -03:00
parent eb4b77728b
commit 50e9780e66
4 changed files with 16 additions and 9 deletions

View file

@ -269,7 +269,7 @@ jobs:
copy %pyaudio% dist copy %pyaudio% dist
cd dist cd dist
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
cmd /C set "wheels=" && for /f "delims=" %%i in ('dir /b *.whl') DO set "wheels="%%i" !wheels!" cmd /C set "wheels=" && for /f "delims=" %%i in ('dir /b *.*') DO set "wheels="%%i" !wheels!"
python -m pip install %wheels% python -m pip install %wheels%
python -c "import aqt; # aqt.run()" python -c "import aqt; # aqt.run()"
@ -278,7 +278,7 @@ jobs:
run: | run: |
set -x set -x
cd dist cd dist
python -m pip install *.whl python -m pip install *.*
python -c "import aqt; # aqt.run()" python -c "import aqt; # aqt.run()"
- run: make check - run: make check

View file

@ -64,7 +64,7 @@ TSDEPS := $(wildcard ts/src/*.ts) $(wildcard ts/scss/*.scss)
python -m black aqt/gui_hooks.py python -m black aqt/gui_hooks.py
@touch $@ @touch $@
BUILD_STEPS := .build/run-deps .build/dev-deps .build/js .build/ui aqt/buildinfo.py .build/hooks .build/i18n BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps .build/js .build/ui aqt/buildinfo.py .build/hooks .build/i18n
# Checking # Checking
###################### ######################
@ -129,8 +129,8 @@ CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py)
.PHONY: build .PHONY: build
build: $(BUILD_STEPS) build: $(BUILD_STEPS)
rm -rf dist build rm -rf dist build
python setup.py -q bdist_wheel python setup.py -q sdist
rsync -a dist/*.whl ../dist/ rsync -a dist/*.tar.gz ../dist/
.PHONY: develop .PHONY: develop
develop: $(BUILD_STEPS) develop: $(BUILD_STEPS)
@ -138,3 +138,9 @@ develop: $(BUILD_STEPS)
aqt/buildinfo.py: ../meta/version ../meta/buildhash aqt/buildinfo.py: ../meta/version ../meta/buildhash
echo "buildhash='$$(cat ../meta/buildhash)'" > $@ echo "buildhash='$$(cat ../meta/buildhash)'" > $@
echo "version='$$(cat ../meta/version)'" >> $@ echo "version='$$(cat ../meta/version)'" >> $@
VER := $(shell cat ../meta/version)
.build/vernum: ../meta/version
sed -i.bak 's/.*automatically updated.*/ version="$(VER)", # automatically updated/' setup.py
rm setup.py.bak
@touch $@

4
qt/pyproject.toml Normal file
View file

@ -0,0 +1,4 @@
[build-system]
# Minimum requirements for the build system to execute.
# https://stackoverflow.com/questions/48048745/setup-py-require-a-recent-version-of-setuptools-before-trying-to-install
requires = ["setuptools", "wheel"]

View file

@ -5,9 +5,6 @@ from distutils.version import LooseVersion
import setuptools import setuptools
with open("../meta/version") as fh:
version = fh.read().strip()
def package_files(directory): def package_files(directory):
entries = [] entries = []
@ -59,7 +56,7 @@ if not IS_PYQT_INSTALLED or (
setuptools.setup( setuptools.setup(
name="aqt", name="aqt",
version=version, version="2.1.24", # automatically updated
author="Ankitects Pty Ltd", author="Ankitects Pty Ltd",
description="Anki's Qt GUI code", description="Anki's Qt GUI code",
long_description="Anki's QT GUI code", long_description="Anki's QT GUI code",