OLD | NEW |
1 # This file is part of Adblock Plus <https://adblockplus.org/>, | 1 # This file is part of Adblock Plus <https://adblockplus.org/>, |
2 # Copyright (C) 2006-present eyeo GmbH | 2 # Copyright (C) 2006-present eyeo GmbH |
3 # | 3 # |
4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
7 # | 7 # |
8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 import subprocess | |
17 from os import path | 16 from os import path |
18 from setuptools import setup, Command | 17 from setuptools import setup |
19 | 18 |
20 | 19 with open(path.join(path.dirname(__file__), 'README.rst')) as fh: |
21 DEVENV = 'devenv' | 20 long_description = fh.read() |
22 PIP = path.join(DEVENV, 'bin', 'pip') | |
23 DEV_DEPENDENCIES = ['pytest', 'mock', 'tox'] | |
24 | |
25 | |
26 class DevEnvCommand(Command): | |
27 """Set up development virtualenv.""" | |
28 | |
29 description = 'set up development virtualenv' | |
30 user_options = [('python=', 'p', 'the python interpreter to use')] | |
31 | |
32 def initialize_options(self): | |
33 self.python = 'python' | |
34 | |
35 def finalize_options(self): | |
36 pass | |
37 | |
38 def run(self): | |
39 subprocess.check_call(['virtualenv', '-p', self.python, DEVENV]) | |
40 subprocess.check_call([PIP, 'install'] + DEV_DEPENDENCIES) | |
41 subprocess.check_call([PIP, 'install', '-e', '.']) | |
42 | |
43 | 21 |
44 setup( | 22 setup( |
45 name='python-abp', | 23 name='python-abp', |
46 version='0.0.1', | 24 version='0.1.0', |
47 description='ABP python tools', | 25 description='A library for working with Adblock Plus filter lists.', |
48 long_description='A library for working with Adblock Plus filter lists.', | 26 long_description=long_description, |
49 author='Eyeo GmbH', | 27 long_description_content_type='text/x-rst', |
| 28 author='eyeo GmbH', |
50 author_email='info@adblockplus.org', | 29 author_email='info@adblockplus.org', |
51 url='https://hg.adblockplus.org/python-abp/', | 30 url='https://hg.adblockplus.org/python-abp/', |
52 packages=['abp', 'abp.filters'], | 31 packages=['abp', 'abp.filters'], |
53 cmdclass={'devenv': DevEnvCommand}, | |
54 entry_points={ | 32 entry_points={ |
55 'console_scripts': ['flrender=abp.filters.render_script:main', | 33 'console_scripts': ['flrender=abp.filters.render_script:main', |
56 'fldiff=abp.filters.diff_script:main'], | 34 'fldiff=abp.filters.diff_script:main'], |
57 }, | 35 }, |
58 include_package_data=True, | 36 include_package_data=True, |
59 license='GPLv3', | 37 license='GPLv3', |
60 zip_safe=False, | 38 zip_safe=False, |
61 keywords='filterlist adblockplus ABP', | 39 keywords='filterlist adblockplus ABP', |
62 classifiers=[ | 40 classifiers=[ |
63 'Development Status :: 2 - Pre-Alpha', | 41 'Development Status :: 4 - Beta', |
64 'Intended Audience :: Developers', | 42 'Intended Audience :: Developers', |
65 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', | 43 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', |
66 'Natural Language :: English', | 44 'Natural Language :: English', |
67 'Programming Language :: Python :: 2', | 45 'Programming Language :: Python :: 2', |
68 'Programming Language :: Python :: 2.7', | 46 'Programming Language :: Python :: 2.7', |
69 'Programming Language :: Python :: 3', | 47 'Programming Language :: Python :: 3', |
70 'Programming Language :: Python :: 3.5', | 48 'Programming Language :: Python :: 3.5', |
71 'Programming Language :: Python :: 3.6', | 49 'Programming Language :: Python :: 3.6', |
| 50 'Operating System :: OS Independent', |
| 51 'Topic :: Software Development :: Libraries :: Python Modules', |
72 ], | 52 ], |
73 ) | 53 ) |
OLD | NEW |