python-pycparser/fix-lexer-build.patch
Dirk Mueller 5782eb35d2 - update to 2.21:
- Much improved support for C11 (multiple PRs)
  - Support for parehthesized compount statements (#423)
  - Support for modern Python versions (3.9 and 3.10)
  - Fix support for structs with nested enums (#387)
  - Multiple small bug fixes

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycparser?expand=0&rev=29
2021-11-29 15:48:01 +00:00

44 lines
1.5 KiB
Diff

Index: pycparser-2.21/setup.py
===================================================================
--- pycparser-2.21.orig/setup.py
+++ pycparser-2.21/setup.py
@@ -1,11 +1,11 @@
import os, sys
try:
from setuptools import setup
- from setuptools.command.install import install as _install
+ from setuptools.command.build import build as _build
from setuptools.command.sdist import sdist as _sdist
except ImportError:
from distutils.core import setup
- from distutils.command.install import install as _install
+ from distutils.command.build import build as _build
from distutils.command.sdist import sdist as _sdist
@@ -18,10 +18,10 @@ def _run_build_tables(dir):
cwd=os.path.join(dir, 'pycparser'))
-class install(_install):
+class build(_build):
def run(self):
- _install.run(self)
- self.execute(_run_build_tables, (self.install_lib,),
+ _build.run(self)
+ self.execute(_run_build_tables, (self.build_lib,),
msg="Build the lexing/parsing tables")
@@ -64,7 +64,7 @@ setup(
'Programming Language :: Python :: 3.10',
],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
- packages=['pycparser', 'pycparser.ply'],
- package_data={'pycparser': ['*.cfg']},
- cmdclass={'install': install, 'sdist': sdist},
+ packages=['pycparser', 'pycparser.ply', 'utils.fake_libc_include'],
+ package_data={'pycparser': ['*.cfg'], 'utils.fake_libc_include': ['*.h', 'xcb/*']},
+ cmdclass={'build': build, 'sdist': sdist},
)