[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Refactor setup.py script
commit 957f20d5c3a590bf2c9db3f15dcbc6c0daa1be73
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Fri Dec 7 01:53:16 2012 +0100
Refactor setup.py script
(cherry picked from commit a3b8bb52711537e1db8770bf447230f812b68166)
---
setup.py | 44 ++++++++++++--------------------------------
1 files changed, 12 insertions(+), 32 deletions(-)
diff --git a/setup.py b/setup.py
index 1b8ecc3..3844036 100644
--- a/setup.py
+++ b/setup.py
@@ -1,37 +1,17 @@
-from __future__ import with_statement
-from setuptools import setup, find_packages
+#!/usr/bin/env python
+#-*- coding: utf-8 -*-
-def get_requirements():
- with open('requirements.txt', 'r') as f:
- requirements = f.read().splitlines()
-
- with open('oonib/requirements.txt', 'r') as f:
- requirements += f.read().splitlines()
-
- # For urls such as https://hg.secdev.org/scapy/archive/tip.zip#egg=scapy in
- # requirements.txt we need to add the package name to install_requires and
- # the entire url to dependency_links. That way setuptools will be able to
- # satisfy the dependency using that url (as long as it is in standard sdist
- # format, a single .py file or an egg).
- pypi_packages = []
- dependency_links = []
- for package_desc in requirements:
- if '#egg=' in package_desc:
- dependency_links.append(package_desc)
- pypi_packages.append(package_desc.split('#egg=')[-1])
- else:
- pypi_packages.append(package_desc)
-
- return pypi_packages, dependency_links
-
-install_requires, dependency_links = get_requirements()
+from distutils.core import setup
setup(
name="ooni-probe",
- version="0.6",
- url="http://ooni.nu/",
- packages=find_packages(),
- scripts=["bin/canary", "bin/oonib", "bin/ooniprobe"],
- install_requires=install_requires,
- dependency_links=dependency_links,
+ version="0.0.8",
+ author="Arturo Filastò",
+ author_email = "art@xxxxxxxxxxxxxx",
+ url="https://ooni.torproject.org/",
+ package_dir={'ooni': 'ooni'},
+ packages=['ooni', 'ooni.templates', 'ooni.utils'],
+ scripts=["bin/ooniprobe"],
+ install_requires=open('requirements.txt').readlines(),
+ dependency_links=["https://hg.secdev.org/scapy/archive/tip.zip#egg=scapy"]
)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits