diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-10-23 15:45:48 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-10-25 10:29:50 -0700 |
commit | 9aae0c91fc5236d729c212640b3a79275638694c (patch) | |
tree | ec7c53278b03525210cbbcea132254d5d83094b6 /meta-python/recipes-devtools/python | |
parent | 2768146fd2c744315ac92cc7b654863e1dea5984 (diff) | |
download | meta-openembedded-contrib-9aae0c91fc5236d729c212640b3a79275638694c.tar.gz |
python3-astor: Fix build with setuptools>=41.4
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch | 87 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-astor_0.8.bb | 4 |
2 files changed, 90 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch b/meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch new file mode 100644 index 0000000000..823699339e --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch @@ -0,0 +1,87 @@ +From f820f3ff7ad8818475b6e107e63aa9a54252d2a9 Mon Sep 17 00:00:00 2001 +From: Jonathan Ringer <jonringer117@gmail.com> +Date: Thu, 17 Oct 2019 16:54:16 -0700 +Subject: [PATCH] Fix packaging for setuptools>=41.4 + +--- + astor/VERSION | 1 + + astor/__init__.py | 5 ++++- + setup.cfg | 3 ++- + setup.py | 16 +--------------- + 4 files changed, 8 insertions(+), 17 deletions(-) + create mode 100644 astor/VERSION + +diff --git a/astor/VERSION b/astor/VERSION +new file mode 100644 +index 0000000..a3df0a6 +--- /dev/null ++++ b/astor/VERSION +@@ -0,0 +1 @@ ++0.8.0 +diff --git a/astor/__init__.py b/astor/__init__.py +index 3b02983..8dfcdb1 100644 +--- a/astor/__init__.py ++++ b/astor/__init__.py +@@ -9,6 +9,7 @@ + + """ + ++import os + import warnings + + from .code_gen import SourceGenerator, to_source # NOQA +@@ -19,7 +20,9 @@ + from .op_util import symbol_data # NOQA + from .tree_walk import TreeWalk # NOQA + +-__version__ = '0.8.0' ++ROOT = os.path.dirname(__file__) ++with open(os.path.join(ROOT, 'VERSION')) as version_file: ++ __version__ = version_file.read().strip + + parse_file = code_to_ast.parse_file + +diff --git a/setup.cfg b/setup.cfg +index 1baf6fc..a43634f 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -2,6 +2,7 @@ + name = astor + description = Read/rewrite/write Python ASTs + long_description = file:README.rst ++version = file: astor/VERSION + author = Patrick Maupin + author_email = pmaupin@gmail.com + platforms = Independent +@@ -40,7 +41,7 @@ test_suite = nose.collector + [options.packages.find] + exclude = tests + +-[wheel] ++[bdist_wheel] + universal = 1 + + [build-system] +diff --git a/setup.py b/setup.py +index 4a111b5..6068493 100644 +--- a/setup.py ++++ b/setup.py +@@ -1,17 +1,3 @@ +-import os +-import sys +- + from setuptools import setup +-from setuptools.config import read_configuration +- +-from setuputils import find_version +- +- +-def here(*paths): +- return os.path.join(os.path.dirname(__file__), *paths) +- +-config = read_configuration(here('setup.cfg')) +-config['metadata']['version'] = find_version(here('astor', '__init__.py')) +-config['options'].update(config['metadata']) + +-setup(**config['options']) ++setup() diff --git a/meta-python/recipes-devtools/python/python3-astor_0.8.bb b/meta-python/recipes-devtools/python/python3-astor_0.8.bb index efd56c1b06..17cc540f00 100644 --- a/meta-python/recipes-devtools/python/python3-astor_0.8.bb +++ b/meta-python/recipes-devtools/python/python3-astor_0.8.bb @@ -4,7 +4,9 @@ SECTION = "devel/python" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=561205fdabc3ec52cae2d30815b8ade7" -SRC_URI = "git://github.com/berkerpeksag/astor.git" +SRC_URI = "git://github.com/berkerpeksag/astor.git \ + file://f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch \ + " SRCREV ?= "3a7607e31f0c17e747ded5cfe0b582d99f7caecf" inherit setuptools3 |