more python3 adjustments
This commit is contained in:
parent
fe73619660
commit
575aecc254
|
@ -62,9 +62,17 @@
|
|||
|
||||
#define EXT3
|
||||
|
||||
#ifndef Py_TPFLAGS_HAVE_CLASS
|
||||
#define Py_TPFLAGS_HAVE_CLASS (0)
|
||||
#endif
|
||||
|
||||
#ifndef Py_TPFLAGS_HAVE_WEAKREFS
|
||||
#define Py_TPFLAGS_HAVE_WEAKREFS (0)
|
||||
#endif
|
||||
|
||||
#ifndef Py_TPFLAGS_HAVE_ITER
|
||||
#define Py_TPFLAGS_HAVE_ITER (0)
|
||||
#endif
|
||||
|
||||
#ifndef PyMODINIT_FUNC
|
||||
#define EXT_INIT_FUNC PyObject *CONCATENATE(PyInit_, EXT_MODULE)(void)
|
||||
|
|
10
py3/setup.py
10
py3/setup.py
|
@ -250,14 +250,14 @@ def make_manifest(manifest, config, docs, kwargs):
|
|||
kwargs['packages'] = list(kwargs.get('packages') or ()) + [
|
||||
'_setup', '_setup.py2', '_setup.py3',
|
||||
] + list(manifest.get('packages.extra', '').split() or ())
|
||||
_core._setup_stop_after = "commandline"
|
||||
_core._setup_stop_after = "commandline" # noqa pylint: disable = protected-access
|
||||
try:
|
||||
dist = _core.setup(**kwargs)
|
||||
finally:
|
||||
_core._setup_stop_after = None
|
||||
_core._setup_stop_after = None # pylint: disable = protected-access
|
||||
|
||||
result = ['MANIFEST', 'PKG-INFO', 'setup.py'] + list(config)
|
||||
# TODO: work with default values:
|
||||
# xx: work with default values?
|
||||
for key in ('classifiers', 'description', 'summary', 'provides',
|
||||
'license'):
|
||||
filename = docs.get('meta.' + key, '').strip()
|
||||
|
@ -335,10 +335,14 @@ def make_manifest(manifest, config, docs, kwargs):
|
|||
|
||||
def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
|
||||
""" Main runner """
|
||||
# pylint: disable = too-many-locals
|
||||
if ext is None:
|
||||
ext = []
|
||||
|
||||
cfg = _util.SafeConfigParser()
|
||||
if (3, 0, 0) <= _sys.version_info < (3, 2, 0):
|
||||
cfg.read(config)
|
||||
else:
|
||||
cfg.read(config, encoding='utf-8')
|
||||
pkg = dict(cfg.items('package'))
|
||||
python_min = pkg.get('python.min') or None
|
||||
|
|
Loading…
Reference in New Issue