sdgathman / pymilter

Python bindings for libmilter api
GNU General Public License v2.0
42 stars 22 forks source link

python 3.11 compatibility in setup - deprecation warning #54

Open gene-git opened 1 year ago

gene-git commented 1 year ago

Running:

python setup.py install

Gives this warning:

/usr/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

gene-git commented 1 year ago

While this doesn't fix the install bug - it looks like

from setuptools 

should be replaced by

from distutils.core

kitterma commented 1 year ago

On April 29, 2023 2:21:11 PM UTC, Gene @.***> wrote:

The fix is simple - in setup.py

replace

from setuptools import setup, Extension

with

from distutils.core import setup, Extension

No. Distutils is also deprecated (will be removed in python 3.12, I believe).

We need to add a pyproject.toml file to use the non-deprecated interface. Optionally, we could also switch to something like Flit instead of Setuptools, but that's not essential.

I can do the change (I've migrated other packages).

Stuart,

Let me know if you want me to handle it?

Scott K

gene-git commented 1 year ago

Thanks Scott - sorry for being off the mark. (Still happily using your dkimpy milter :) )

sdgathman commented 1 year ago

[mutter]I have yet to see a table driven system that I didn't have to jury rig code escapes. But maybe pyproject.toml already provides that (it's easy in python - just reference a function or class).[/mutter]

Yes please. An example would save much time.