diff --git a/.gitignore b/.gitignore index 43d9acc..65fb80f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,10 @@ /dist *.pyc /.vscode -venv \ No newline at end of file +venv +*.o +*.a +*.so +build/ +ctversion.py +.eggs \ No newline at end of file diff --git a/Makefile b/Makefile index c863151..abf5b94 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION_STR := $(shell python -c 'import comictaggerlib.ctversion; print( comictaggerlib.ctversion.version)') +VERSION_STR := $(shell python setup.py --version) ifeq ($(OS),Windows_NT) OS_VERSION=win-$(PROCESSOR_ARCHITECTURE) @@ -30,6 +30,7 @@ clean: rm -f unrar/libunrar.so unrar/libunrar.a unrar/unrar rm -f comictaggerlib/libunrar.so rm -rf comictaggerlib/ui/__pycache__ + rm comitaggerlib/ctversion.py pydist: make clean @@ -53,5 +54,6 @@ else endif dist: unrar + pip install . pyinstaller -y comictagger.spec cd dist && zip -r $(FINAL_NAME).zip $(APP_NAME) diff --git a/comictaggerlib/ctversion.py b/comictaggerlib/ctversion.py deleted file mode 100644 index ee37d04..0000000 --- a/comictaggerlib/ctversion.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file should contain only these comments, and the line below. -# Used by packaging makefiles and app -version = "1.2.0+2" \ No newline at end of file diff --git a/current_version.txt b/current_version.txt deleted file mode 100644 index 70b509f..0000000 --- a/current_version.txt +++ /dev/null @@ -1 +0,0 @@ -1.2.0+2 diff --git a/mac/Makefile b/mac/Makefile index 8e13fb2..1ad7d0b 100644 --- a/mac/Makefile +++ b/mac/Makefile @@ -5,7 +5,7 @@ TAGGER_BASE ?= ../ TAGGER_SRC := $(TAGGER_BASE)/comictaggerlib APP_NAME := ComicTagger -VERSION_STR := $(shell grep version $(TAGGER_SRC)/ctversion.py| cut -d= -f2 | sed 's/\"//g') +VERSION_STR := $(shell python setup.py --version) MAC_BASE := $(TAGGER_BASE)/mac DIST_DIR := $(MAC_BASE)/dist diff --git a/requirements.txt b/requirements.txt index a20fb10..c775c01 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ natsort==3.5.2 PyPDF2==1.24 pillow>=4.3.0 PyQt5>=5.10.1 -git+https://github.com/pyinstaller/pyinstaller@develop \ No newline at end of file +pyinstaller>=3.5 \ No newline at end of file diff --git a/setup.py b/setup.py index b336415..679d991 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,6 @@ import sys import shutil import platform import tempfile -import comictaggerlib.ctversion python_requires='>=3', @@ -193,7 +192,6 @@ setup(name="comictagger", 'build_py': BuildPyCommand, 'install': customInstall, }, - version=comictaggerlib.ctversion.version, description="A cross-platform GUI/CLI app for writing metadata to comic archives", author="ComicTagger team", author_email="comictagger@gmail.com", @@ -204,6 +202,12 @@ setup(name="comictagger", }, entry_points=dict(console_scripts=['comictagger=comictaggerlib.main:ctmain']), data_files=platform_data_files, + setup_requires=[ + "setuptools_scm" + ], + use_scm_version={ + 'write_to': 'comictaggerlib/ctversion.py' + }, classifiers=[ "Development Status :: 4 - Beta", "Environment :: Console",