Skip to content

Commit

Permalink
Tidy up setup.py to import requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
codelucas committed Dec 17, 2014
1 parent 8aee027 commit 70f6866
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include newspaper *include requirements.txt
include requirements.txt
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 11 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
#!/bin/python2.7
# -*- coding: utf-8 -*-
"""
Lucas Ou 2014 -- http://lucasou.com
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',
'newspaper.packages.tldextract',
'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',
Expand All @@ -44,6 +41,6 @@
packages=packages,
include_package_data=True,
install_requires=required,
license='',
license='MIT',
zip_safe=False,
)

0 comments on commit 70f6866

Please sign in to comment.