Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python 3 support #220

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ Pillow
lxml
cssselect
jieba
beautifulsoup
beautifulsoup # Only on python2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so your code will not work in python 3?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working in python 3.5.4 as it does not support beautifulsoup. Even after changing the requires.txt with beautidulsoup4 the install didnt work. Attached error file
error_goose_extract.txt

nltk
six
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"""

import os
import sys

from setuptools import setup, find_packages
from imp import load_source

Expand Down Expand Up @@ -53,6 +55,11 @@
except Exception:
long_description = description

requirements = ['Pillow', 'lxml', 'cssselect', 'jieba', 'nltk', 'six']
if sys.version_info.major == 2:
requirements.append('beautifulsoup')


setup(name='goose-extractor',
version=version.__version__,
description=description,
Expand All @@ -66,6 +73,6 @@
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=['Pillow', 'lxml', 'cssselect', 'jieba', 'nltk'],
install_requires=requirements,
test_suite="tests"
)