diff --git a/MANIFEST.in b/MANIFEST.in index 811fa3f01..e5d2fd10f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include newspaper * include requirements.txt \ No newline at end of file +include requirements.txt \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 600f7143a..04423c2bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ nltk==2.0.4 requests==2.3.0 six==1.7.3 jieba==0.35 --e git+https://github.com/karls/responses@regex-url-matching#egg=responses +responses==0.3.0 diff --git a/setup.py b/setup.py index 28596115a..2fc1dce2a 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -#!/bin/python2.7 # -*- coding: utf-8 -*- """ Lucas Ou 2014 -- http://lucasou.com @@ -6,11 +5,20 @@ Setup guide: http://guide.python-distribute.org/creation.html python setup.py sdist bdist_wininst upload """ +import sys +import os + try: from setuptools import setup except ImportError: from distutils.core import setup + +if sys.argv[-1] == 'publish': + os.system('python setup.py sdist bdist_wininst upload') + sys.exit() + + packages = [ 'newspaper', 'newspaper.packages', @@ -18,21 +26,10 @@ 'newspaper.packages.feedparser', ] -required = [] + with open('requirements.txt') as f: required = f.read().splitlines() -""" -requires = [ - 'lxml==3.3.5', - 'jieba==0.35', - 'requests==2.3.0', - 'nltk==2.0.4', - 'Pillow==2.5.1', - 'cssselect==0.9.1', - 'BeautifulSoup==3.2.1' -] -""" setup( name='newspaper', @@ -44,6 +41,6 @@ packages=packages, include_package_data=True, install_requires=required, - license='', + license='MIT', zip_safe=False, )