From f82cb002bcfa4f55452575096e93eaeaef85f2aa Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Tue, 19 Jan 2016 13:27:18 -0800 Subject: [PATCH] Try automatic versioning with setuptools_scm --- ocrmypdf/main.py | 4 +++- requirements.txt | 2 +- setup.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ocrmypdf/main.py b/ocrmypdf/main.py index b8f75c4d..5bdaa815 100755 --- a/ocrmypdf/main.py +++ b/ocrmypdf/main.py @@ -36,7 +36,9 @@ warnings.simplefilter('ignore', pypdf.utils.PdfReadWarning) BASEDIR = os.path.dirname(os.path.realpath(__file__)) -VERSION = '3.1.1' + +from setuptools_scm import get_version +VERSION = get_version() # ------------- diff --git a/requirements.txt b/requirements.txt index e152143e..80503533 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ ruffus>=2.6.3 Pillow>=2.4.0 reportlab>=3.1.44 PyPDF2>=1.25.1 -git+https://github.com/jbarlow83/img2pdf.git@1261741136dcbfed65355ed93f4930617a55feee#egg=img2pdf +git+https://github.com/jbarlow83/img2pdf.git@e9bcce0afc3720752ca53a991db93f911a1df709#egg=img2pdf diff --git a/setup.py b/setup.py index fd8d2462..24afb679 100644 --- a/setup.py +++ b/setup.py @@ -184,7 +184,6 @@ tests_require = open('test_requirements.txt').read().splitlines() setup( name='ocrmypdf', - version='3.1.1', # also update: release notes, main.py description='OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched', url='https://github.com/jbarlow83/OCRmyPDF', author='James R. Barlow', @@ -208,6 +207,7 @@ setup( "Topic :: Text Processing :: Indexing", "Topic :: Text Processing :: Linguistic", ], + setup_requires=['setuptools_scm'], install_requires=install_requires, tests_require=tests_require, entry_points={ @@ -216,4 +216,5 @@ setup( ], }, include_package_data=True, + use_scm_version=True, zip_safe=False)