Ported setup.py to python 3
This commit is contained in:
17
setup.py
17
setup.py
@@ -1,3 +1,4 @@
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
@@ -8,7 +9,9 @@ from setuptools import setup, find_packages
|
||||
|
||||
|
||||
def read(*parts):
|
||||
return codecs.open(os.path.join(os.path.dirname(__file__), *parts)).read()
|
||||
filename = os.path.join(os.path.dirname(__file__), *parts)
|
||||
with codecs.open(filename, encoding='utf-8') as fp:
|
||||
return fp.read()
|
||||
|
||||
|
||||
def find_version(*file_paths):
|
||||
@@ -76,9 +79,8 @@ def find_package_data(where='.', package='',
|
||||
if (fnmatchcase(name, pattern) or fn.lower() == pattern.lower()):
|
||||
bad_name = True
|
||||
if show_ignored:
|
||||
print >> sys.stderr, (
|
||||
"Directory %s ignored by pattern %s"
|
||||
% (fn, pattern))
|
||||
print("Directory %s ignored by pattern %s" %
|
||||
(fn, pattern), file=sys.stderr)
|
||||
break
|
||||
if bad_name:
|
||||
continue
|
||||
@@ -97,9 +99,8 @@ def find_package_data(where='.', package='',
|
||||
if (fnmatchcase(name, pattern) or fn.lower() == pattern.lower()):
|
||||
bad_name = True
|
||||
if show_ignored:
|
||||
print >> sys.stderr, (
|
||||
"File %s ignored by pattern %s"
|
||||
% (fn, pattern))
|
||||
print("File %s ignored by pattern %s" %
|
||||
(fn, pattern), file=sys.stderr)
|
||||
break
|
||||
if bad_name:
|
||||
continue
|
||||
@@ -126,6 +127,8 @@ setup(
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.2',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Topic :: Internet :: WWW/HTTP',
|
||||
],
|
||||
zip_safe=False,
|
||||
|
Reference in New Issue
Block a user