Skip to content

Commit

Permalink
simplify setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
craigahobbs committed Jul 26, 2021
1 parent 04e09cf commit 19265ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 4 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
author = 'Craig Hobbs'

# The full version, including alpha/beta/rc tags
import chisel
release = chisel.VERSION
import os
import re
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'setup.py'), encoding='utf-8') as init_file:
release = re.search(r"version='(.+?)'", init_file.read()).group(1)


# -- General configuration ---------------------------------------------------
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

# pylint: disable=missing-docstring

import re
import os

from setuptools import setup
Expand All @@ -12,10 +11,6 @@
PACKAGE_NAME = MODULE_NAME

def main():
# Read the package version
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'src', MODULE_NAME, '__init__.py'), encoding='utf-8') as init_file:
version = re.search(r"VERSION = '(.+?)'", init_file.read()).group(1)

# Read the readme for use as the long description
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst'), encoding='utf-8') as readme_file:
long_description = readme_file.read()
Expand All @@ -26,7 +21,7 @@ def main():
description='Light-weight WSGI application framework, schema-validated JSON APIs, and API documentation.',
long_description=long_description,
long_description_content_type='text/x-rst',
version=version,
version='1.1.0',
author='Craig Hobbs',
author_email='craigahobbs@gmail.com',
keywords='api json framework schema wsgi',
Expand Down
3 changes: 0 additions & 3 deletions src/chisel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@
Request, \
StaticRequest, \
request


VERSION = '1.1.0'

0 comments on commit 19265ff

Please sign in to comment.