Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to compile mod_python with Python3.11 #125

Open
shaheena86 opened this issue Aug 4, 2023 · 0 comments
Open

Not able to compile mod_python with Python3.11 #125

shaheena86 opened this issue Aug 4, 2023 · 0 comments

Comments

@shaheena86
Copy link

Hi,

I am using
Python3.11
Debian 12

I am getting the below errors while compiling mod_python with Python 3.11
I am using the below commands:
./configure --with-apxs=which apxs2 --with-python=which python3.11
make
make install DESTDIR=$PWD/../mod_python_compiled

On make install I get the below errors as setup.py install is deprecated...

Performing DSO installation.
/usr/bin/install -c -d /jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/../mod_python_compiled/usr/lib/apache2/modules
/usr/bin/install -c src/mod_python.so /jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/../mod_python_compiled/usr/lib/apache2/modules
make[1]: Leaving directory '/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master'
make install_py_lib
make[1]: Entering directory '/jenkins/workspace/Branch-Name/directory/util/mod_python3/mod_python-master'
cd dist && make install_py_lib
make[2]: Entering directory '/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/dist'
make[3]: Entering directory '/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/src'
make[3]: 'psp_parser.c' is up to date.
make[3]: Leaving directory '/jenkins/workspace/Branch-Name/directory/util/mod_python3/mod_python-master/src'
if test -z "/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/../mod_python_compiled" ; then \
	/usr/bin/python3.11 setup.py install --optimize 2 --force ; \
else \
	/usr/bin/python3.11 setup.py install --optimize 2 --force --root /jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/../mod_python_compiled ; \
fi
/usr/lib/python3/dist-packages/setuptools/dist.py:548: UserWarning: The version specified ('3.5.0-4e9c07be3') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/dist/setup.py", line 200, in <module>
    setup(name="mod_python",
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 68, in run
    return orig.install.run(self)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 709, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/command/install_egg_info.py", line 31, in finalize_options
    ei_cmd = self.get_finalized_command("egg_info")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 219, in finalize_options
    parsed_version = parse_version(self.egg_version)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '3.5.0-4e9c07be3'
make[2]: *** [Makefile:36: install_py_lib] Error 1
make[2]: Leaving directory '/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master/dist'
make[1]: *** [Makefile:67: install_py_lib] Error 2
make[1]: Leaving directory '/jenkins/workspace/Branch-Name/directory/mod_python3/mod_python-master'
make: *** [Makefile:56: install] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant