From 66e94e353c1a8adc61871ae321c6a3d1a06f311a Mon Sep 17 00:00:00 2001 From: Lucas Bourneuf Date: Thu, 4 Mar 2021 13:47:22 +0100 Subject: [PATCH 1/3] use declarative packaging + better version announcement handling --- setup.cfg | 30 +++++++++++++++++++++++++++- setup.py | 48 +-------------------------------------------- tock/__init__.py | 1 + tock/__version__.py | 1 - 4 files changed, 31 insertions(+), 49 deletions(-) delete mode 100644 tock/__version__.py diff --git a/setup.cfg b/setup.cfg index 224a779..8019996 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,30 @@ [metadata] -description-file = README.md \ No newline at end of file +name = tock-py +version = attr: tock.__version__ +description = Build chatbots using Tock and Python +long_description = file: README.md +long_description_content_type = text/markdown +author = Erwan LE BESCOND +author_email = elebescond@gmail.com +url = https://github.com/theopenconversationkit/tock-py/ +license = MIT +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: MIT License + Operating System :: OS Independent + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + +[options] +zip_safe = False +include_package_data = True +packages = tock +install_requires = + aiohttp==3.6.2 + asyncio==3.4.3 + marshmallow==3.7.1 + marshmallow_enum==1.5.1 + marshmallow-oneofschema==2.0.1 + testfixtures==6.14.2 diff --git a/setup.py b/setup.py index 4e9b174..b908cbe 100644 --- a/setup.py +++ b/setup.py @@ -1,49 +1,3 @@ -import os -import re - import setuptools -with open("README.md", "r") as fh: - long_description = fh.read() - -PKG = "tock" -VERSIONFILE = os.path.join(PKG, "__version__.py") - -try: - verstrline = open(VERSIONFILE, "rt").read() -except EnvironmentError: - pass # Okay, there is no version file. -else: - VSRE = r"^verstr = ['\"]([^'\"]*)['\"]" - mo = re.search(VSRE, verstrline, re.M) - if mo: - version = mo.group(1) - else: - print("unable to find version in %s" % (VERSIONFILE,)) - raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,)) - -setuptools.setup( - name="tock-py", - version=version, - author="Erwan LE BESCOND", - author_email="elebescond@gmail.com", - description="Build chatbots using Tock and Python", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/theopenconversationkit/tock-py/", - packages=setuptools.find_packages(), - install_requires=[ - 'aiohttp==3.6.2', - 'asyncio==3.4.3', - 'marshmallow==3.7.1', - 'marshmallow_enum==1.5.1', - 'marshmallow-oneofschema==2.0.1', - 'testfixtures==6.14.2', - ], - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - python_requires='>=3.6', -) +setuptools.setup() diff --git a/tock/__init__.py b/tock/__init__.py index e69de29..3bca2a1 100644 --- a/tock/__init__.py +++ b/tock/__init__.py @@ -0,0 +1 @@ +__version__ = '0.0.1-dev10' diff --git a/tock/__version__.py b/tock/__version__.py deleted file mode 100644 index 8d161f1..0000000 --- a/tock/__version__.py +++ /dev/null @@ -1 +0,0 @@ -verstr = '0.0.1-dev10' From 8e3cc31f685312347a55c2f029c014dc90ab9e9b Mon Sep 17 00:00:00 2001 From: Lucas Bourneuf Date: Mon, 8 Mar 2021 14:57:58 +0100 Subject: [PATCH 2/3] setup bumpversion config to handle new packaging org --- setup.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.cfg b/setup.cfg index 8019996..ef53efb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,3 +28,9 @@ install_requires = marshmallow_enum==1.5.1 marshmallow-oneofschema==2.0.1 testfixtures==6.14.2 + +[bumpversion] +commit = True +tag = True +current_version = 1.0.1 +[bumpversion:file:tock/__init__.py] From 86b789df4d94d35d9083a4925edeea4c5c62ebb5 Mon Sep 17 00:00:00 2001 From: Lucas Bourneuf Date: Thu, 11 Mar 2021 10:33:02 +0100 Subject: [PATCH 3/3] move all dependencies into requirements.txt --- requirements.txt | 4 ++-- setup.cfg | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 74d3541..976e5a8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -aiohttp==3.7.2 +aiohttp==3.7.4 asyncio==3.4.3 isodate==0.6.0 marshmallow==3.9.1 marshmallow_enum==1.5.1 marshmallow-oneofschema==2.1.0 -testfixtures==6.15.0 \ No newline at end of file +testfixtures==6.15.0 diff --git a/setup.cfg b/setup.cfg index ef53efb..084f28d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,13 +21,7 @@ classifiers = zip_safe = False include_package_data = True packages = tock -install_requires = - aiohttp==3.6.2 - asyncio==3.4.3 - marshmallow==3.7.1 - marshmallow_enum==1.5.1 - marshmallow-oneofschema==2.0.1 - testfixtures==6.14.2 +install_requires = file: requirements.txt [bumpversion] commit = True