[PATCH gnupgpy 3/5] build: Drop distutils from setup.py

Lucas via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <a5c5dd7b2b1dd88eb3a02de7645a03795b13e371.1742770151.git.lucc@posteo.de>
* setup.py.in: Drop fallback code for distutils in case setuptools is
not available
--

We are now using the pyproject.toml file to statically declare our build
time dependencies.  This ensures that a compatible version of setuptools
should be available by the time the setup.py file is executed.  For that
reason we do not need the fallback code any longer.

Also order imports according to PEP-8 and drop unused "glob" import.

Signed-off-by: Lucas Hoffmann <[email protected]>
---
 setup.py.in | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
0003-build-Drop-distutils-from-setup.py.patch (text/x-patch, 786 B)
diff --git a/setup.py.in b/setup.py.in
index 3f57232..c866a1b 100755
--- a/setup.py.in
+++ b/setup.py.in
@@ -18,14 +18,6 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
-try:
-    from setuptools import setup, Extension
-    from setuptools.command.build import build
-except ImportError:
-    from distutils.core import setup, Extension
-    from distutils.command.build import build
-
-import glob
 import os
 import os.path
 import re
@@ -33,6 +25,9 @@ import shutil
 import subprocess
 import sys
 
+from setuptools import setup, Extension
+from setuptools.command.build import build
+
 # Out-of-tree build of the gpg bindings.
 gpgme_h = ''
 include_dirs = [os.getcwd()]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.