Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: setup.py

Issue 29338156: Issue 3754 - Initial setup of the python-abp repo. (Closed)
Patch Set: Remove pytest from qa dependencies in tox.ini, change "filterlist" to "filter list" Created March 17, 2016, 2:39 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « abp/filters/__init__.py ('k') | tests/test_line_parsing.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: setup.py
===================================================================
new file mode 100644
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,68 @@
+# This file is part of Adblock Plus <https://adblockplus.org/>,
+# Copyright (C) 2006-2016 Eyeo GmbH
+#
+# Adblock Plus is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3 as
+# published by the Free Software Foundation.
+#
+# Adblock Plus is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+
+import subprocess
+from os import path
+from setuptools import setup, Command
+
+
+DEVENV = 'devenv'
+PIP = path.join(DEVENV, 'bin', 'pip')
+DEV_DEPENDENCIES = ['pytest', 'tox']
+
+
+class devenv(Command):
+ """Set up development virtualenv."""
+
+ description = "set up development virtualenv"
+ user_options = [('python=', 'p', "the python interpreter to use")]
+
+ def initialize_options(self):
+ self.python = 'python'
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ subprocess.check_call(['virtualenv', '-p', self.python, DEVENV])
+ subprocess.check_call([PIP, 'install'] + DEV_DEPENDENCIES)
+ subprocess.check_call([PIP, 'install', '-e', '.'])
+
+
+setup(
+ name='python-abp',
+ version='0.0.1',
+ description='ABP python tools',
+ long_description="A library for working with Adblock Plus filter lists.",
+ author='Vasily Kuznetsov',
+ author_email='vasily@adblockplus.org',
+ url='https://hg.adblockplus.org/python-abp/',
+ packages=['abp', 'abp.filters'],
+ cmdclass={'devenv': devenv},
+ include_package_data=True,
+ license='GPLv3',
+ zip_safe=False,
+ keywords='filterlist adblockplus ABP',
+ classifiers=[
+ 'Development Status :: 2 - Pre-Alpha',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
+ 'Natural Language :: English',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.5',
+ ]
+)
« no previous file with comments | « abp/filters/__init__.py ('k') | tests/test_line_parsing.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld