import os
import re
import sys
base_directory = os.path.dirname(__file__)
try:
from setuptools import setup, find_packages
except ImportError:
print('This project needs setuptools in order to build. Install it using your package')
print('manager (usually python-setuptools) or via pip (pip install setuptools).')
sys.exit(1)
try:
with open(os.path.join(base_directory, 'README.rst')) as file_h:
long_description = file_h.read()
except OSError:
sys.stderr.write('README.rst is unavailable, can not generate the long description\n')
long_description = None
with open(os.path.join(base_directory, 'lib', 'rule_engine', '__init__.py')) as file_h:
match = re.search(r'^__version__\s*=\s*([\'"])(?P<version>\d+(\.\d+)*)\1$', file_h.read(), flags=re.MULTILINE)
if match is None:
raise RuntimeError('Unable to find the version information')
version = match.group('version')
DESCRIPTION = """\
A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects.\
"""
setup(
name='rule-engine',
version=version,
author='Spencer McIntyre',
author_email='zeroSteiner@gmail.com',
maintainer='Spencer McIntyre',
maintainer_email='zeroSteiner@gmail.com',
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/x-rst',
url='https://github.com/zeroSteiner/rule-engine',
license='BSD',
install_requires=[
'ply>=3.9',
'python-dateutil~=2.7'
],
package_dir={'': 'lib'},
packages=find_packages('lib'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD 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',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)