OLD | NEW |
(Empty) | |
| 1 # This file is part of Adblock Plus <https://adblockplus.org/>, |
| 2 # Copyright (C) 2006-2016 Eyeo GmbH |
| 3 # |
| 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 |
| 6 # published by the Free Software Foundation. |
| 7 # |
| 8 # Adblock Plus is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. |
| 12 # |
| 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/>. |
| 15 |
| 16 import subprocess |
| 17 from os import path |
| 18 from setuptools import setup, Command |
| 19 |
| 20 |
| 21 DEVENV = 'devenv' |
| 22 PIP = path.join(DEVENV, 'bin', 'pip') |
| 23 DEV_DEPENDENCIES = ['pytest', 'tox'] |
| 24 |
| 25 |
| 26 class devenv(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 |
| 44 setup( |
| 45 name='python-abp', |
| 46 version='0.0.1', |
| 47 description='ABP python tools', |
| 48 long_description="A library for working with Adblock Plus filterlists.", |
| 49 author='Vasily Kuznetsov', |
| 50 author_email='vasily@adblockplus.org', |
| 51 url='https://hg.adblockplus.org/python-abp/', |
| 52 packages=['abp', 'abp.filters'], |
| 53 cmdclass={'devenv': devenv}, |
| 54 include_package_data=True, |
| 55 license='GPLv3', |
| 56 zip_safe=False, |
| 57 keywords='filterlist adblockplus ABP', |
| 58 classifiers=[ |
| 59 'Development Status :: 2 - Pre-Alpha', |
| 60 'Intended Audience :: Developers', |
| 61 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', |
| 62 'Natural Language :: English', |
| 63 'Programming Language :: Python :: 2', |
| 64 'Programming Language :: Python :: 2.7', |
| 65 'Programming Language :: Python :: 3', |
| 66 'Programming Language :: Python :: 3.5', |
| 67 ] |
| 68 ) |
OLD | NEW |