Hello community, here is the log from the commit of package python-astor for openSUSE:Factory checked in at 2019-11-22 10:27:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-astor (Old) and /work/SRC/openSUSE:Factory/.python-astor.new.26869 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astor" Fri Nov 22 10:27:20 2019 rev:4 rq:750111 version:0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-astor/python-astor.changes 2019-09-11 10:39:58.703224488 +0200 +++ /work/SRC/openSUSE:Factory/.python-astor.new.26869/python-astor.changes 2019-11-22 10:27:32.133236196 +0100 @@ -1,0 +2,6 @@ +Thu Nov 14 14:30:21 CET 2019 - Matej Cepl <mc...@suse.com> + +- Add patch to build with setuptools >= 41.4: + * setuptools-gt-41_1.patch + +------------------------------------------------------------------- New: ---- setuptools-gt-41_1.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-astor.spec ++++++ --- /var/tmp/diff_new_pack.qJkk9n/_old 2019-11-22 10:27:33.965235656 +0100 +++ /var/tmp/diff_new_pack.qJkk9n/_new 2019-11-22 10:27:33.965235656 +0100 @@ -26,6 +26,9 @@ URL: https://github.com/berkerpeksag/astor Source: https://github.com/berkerpeksag/astor/archive/%{version}.tar.gz#/astor-%{version}.tar.gz Patch0: python38.patch +# PATCH-FIX-UPSTREAM setuptools-gt-41_1.patch gh#berkerpeksag/astor#163 mc...@suse.com +# Remove weird acrobatics in setup.py and prefer proper use of setup.cfg. +Patch1: setuptools-gt-41_1.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -62,7 +65,7 @@ %prep %setup -q -n astor-%{version} -%patch0 -p1 +%autopatch -p1 # ugly fix for the use of /usr/bin/env sed -i 's@env @@' astor/rtrip.py ++++++ setuptools-gt-41_1.patch ++++++ >From 30059dac4eb832e58ab2109db84508b294ba366d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer <jonringer...@gmail.com> Date: Thu, 17 Oct 2019 16:54:16 -0700 Subject: [PATCH] Fix packaging for setuptools>=41.4 --- MANIFEST.in | 1 + astor/VERSION | 1 + astor/__init__.py | 5 ++++- setup.cfg | 3 ++- setup.py | 16 +--------------- 5 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 astor/VERSION diff --git a/MANIFEST.in b/MANIFEST.in index b12a6fe..81e72d5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include README.rst AUTHORS LICENSE CHANGES include setuputils.py +include astor/VERSION recursive-include tests *.py 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..bdedaef 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 = pmau...@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()