Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use declarative packaging + better version announcement handling #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ isodate==0.6.0
marshmallow==3.9.1
marshmallow_enum==1.5.1
marshmallow-oneofschema==2.1.0
testfixtures==6.15.0
testfixtures==6.15.0
30 changes: 29 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
[metadata]
description-file = README.md
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 = [email protected]
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 = file: requirements.txt

[bumpversion]
commit = True
tag = True
current_version = 1.0.1
[bumpversion:file:tock/__init__.py]
48 changes: 1 addition & 47 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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="[email protected]",
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.7.4',
'asyncio==3.4.3',
'marshmallow==3.9.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()
1 change: 1 addition & 0 deletions tock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.1-dev10'
1 change: 0 additions & 1 deletion tock/__version__.py

This file was deleted.