stoichiograph

Spell words with elemental symbols from the periodic table.
git clone git://git.amin.space/stoichiograph.git
Log | Files | Refs | LICENSE

setup.py (2242B)


      1 import io
      2 import os
      3 import re
      4 from setuptools import setup
      5 
      6 
      7 here = os.path.abspath(os.path.dirname(__file__))
      8 
      9 
     10 def read(*names, **kwargs):
     11     with io.open(
     12         os.path.join(here, *names),
     13         encoding=kwargs.get('encoding', 'utf8')
     14     ) as fp:
     15         return fp.read()
     16 
     17 
     18 def find_version(*file_paths):
     19     version_file = read(*file_paths)
     20     version_match = re.search(
     21         r"^__version__ = ['\"]([^'\"]*)['\"]",
     22         version_file, re.M)
     23     if version_match:
     24         return version_match.group(1)
     25     raise RuntimeError('Unable to find version string.')
     26 
     27 
     28 def readme():
     29     with io.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
     30         return f.read()
     31 
     32 
     33 setup(
     34     name='Stoichiograph',
     35     version=find_version('stoichiograph', '__init__.py'),
     36     description=(
     37         'Spell words with elemental symbols from the periodic table ("He", "Cu", etc).'
     38     ),
     39     long_description=readme(),
     40     url='https://github.com/mesbahamin/stoichiograph',
     41     author='Amin Mesbah',
     42     author_email='mesbahamin@gmail.com',
     43     license='MIT',
     44     # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
     45     classifiers=[
     46         'Development Status :: 4 - Beta',
     47         'Environment :: Console',
     48         'Intended Audience :: Education',
     49         'Intended Audience :: Developers',
     50         'Intended Audience :: End Users/Desktop',
     51         'Topic :: Scientific/Engineering :: Chemistry',
     52         'Topic :: Text Processing :: Filters',
     53         'Topic :: Utilities',
     54         'License :: OSI Approved :: MIT License',
     55         'Natural Language :: English',
     56         'Operating System :: Microsoft :: Windows :: Windows 7',
     57         'Operating System :: POSIX :: Linux',
     58         'Programming Language :: Python :: 3 :: Only',
     59         'Programming Language :: Python :: 3.4',
     60         'Programming Language :: Python :: 3.5',
     61         'Programming Language :: Python :: 3.6',
     62         'Programming Language :: Python :: Implementation :: CPython',
     63     ],
     64     keywords='command-line chemistry words fun combinatorics spelling',
     65     packages=['stoichiograph'],
     66     include_package_data=True,
     67     entry_points={
     68         'console_scripts': [
     69             'stoichiograph = stoichiograph.stoichiograph:main',
     70         ],
     71     },
     72 )