|
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 |
|
4 | 4 | import sys |
| 5 | + |
5 | 6 | try: |
6 | | - import os |
7 | | - from setuptools import setup, find_packages |
| 7 | + from os import path |
| 8 | + from setuptools import setup, find_packages |
8 | 9 | except ImportError: |
9 | | - from distutils.core import setup |
| 10 | + from distutils.core import setup |
| 11 | + |
| 12 | +from vocabulary.version import VERSION |
| 13 | +__version__ = VERSION |
| 14 | + |
| 15 | +here = path.abspath(path.dirname(__file__)) |
| 16 | + |
| 17 | +# get the dependencies and installs |
| 18 | +with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f: |
| 19 | + all_reqs = f.read().split('\n') |
| 20 | + |
| 21 | +install_requires = [x.strip() for x in all_reqs if 'git+' not in x] |
| 22 | +dependency_links = [x.strip().replace('git+', '') for x in all_reqs if 'git+' not in x] |
10 | 23 |
|
11 | 24 | try: |
12 | 25 | if sys.version_info[:2] <= (2, 7): |
|
18 | 31 | readme.close() |
19 | 32 |
|
20 | 33 | setup( |
21 | | - name = 'Vocabulary', |
22 | | - version = '0.0.6', |
23 | | - author = 'Tasdik Rahman', |
24 | | - author_email = 'tasdik95@gmail.com', |
25 | | - description = "Module to get meaning, synonym, antonym, part_of_speech, usage_example, pronunciation and hyphenation for a given word", |
26 | | - long_description=long_description, |
27 | | - url = 'https://github.com/prodicus/vocabulary', |
28 | | - license = 'MIT', |
29 | | - install_requires = [ |
30 | | - "requests==2.13.0", |
31 | | - ], |
32 | | - ### adding package data to it |
33 | | - packages=find_packages(exclude=['contrib', 'docs']), |
34 | | - ### |
35 | | - download_url = 'https://github.com/prodicus/vocabulary/tarball/0.0.6', |
36 | | - classifiers = [ |
37 | | - 'Intended Audience :: Developers', |
38 | | - 'License :: OSI Approved :: MIT License', |
39 | | - 'Natural Language :: English', |
40 | | - 'Programming Language :: Python', |
41 | | - 'Programming Language :: Python :: 2.7', |
42 | | - 'Programming Language :: Python :: 3', |
43 | | - 'Programming Language :: Python :: 3.4', |
44 | | - ], |
45 | | - keywords = ['Dictionary', 'Vocabulary', 'simple dictionary','pydict', 'dictionary module'] |
| 34 | + name='Vocabulary', |
| 35 | + author='Tasdik Rahman', |
| 36 | + version=VERSION, |
| 37 | + author_email='tasdik95@gmail.com', |
| 38 | + description="Module to get meaning, synonym, antonym, part_of_speech, usage_example, pronunciation and hyphenation for a given word", |
| 39 | + long_description=long_description, |
| 40 | + url='https://github.com/prodicus/vocabulary', |
| 41 | + license='MIT', |
| 42 | + install_requires=install_requires, |
| 43 | + dependency_links=dependency_links, |
| 44 | + # adding package data to it |
| 45 | + packages=find_packages(exclude=['contrib', 'docs']), |
| 46 | + download_url='https://github.com/prodicus/vocabulary/tarball/' + __version__, |
| 47 | + classifiers=[ |
| 48 | + 'Intended Audience :: Developers', |
| 49 | + 'License :: OSI Approved :: MIT License', |
| 50 | + 'Natural Language :: English', |
| 51 | + 'Programming Language :: Python', |
| 52 | + 'Programming Language :: Python :: 2.7', |
| 53 | + 'Programming Language :: Python :: 3', |
| 54 | + 'Programming Language :: Python :: 3.4', |
| 55 | + ], |
| 56 | + keywords=['Dictionary', 'Vocabulary', 'simple dictionary', 'pydict', 'dictionary module'] |
46 | 57 | ) |
0 commit comments