$NetBSD: patch-setup.py,v 1.1 2026/02/12 07:40:16 wiz Exp $

dry-run support was removed from setuptools.

--- setup.py.orig	2026-02-12 07:38:13.915349058 +0000
+++ setup.py
@@ -62,7 +62,7 @@ class update_pot(NoOptionCommand):
     def run(self):
         all_py_files = sorted(reduce(operator.add, [[os.path.join(dn, f) for f in fs if f.endswith('.py')] for (dn,ds,fs) in os.walk('.')])) # sort to make diffs easier
         # not working around xgettext not substituting for PACKAGE everywhere in the header; it's just a template and usually worked on using tools that ignore much of it anyway
-        if not self.dry_run:
+        if True:
             info('Creating %s' % POT_FILE)
             subprocess.check_call(['xgettext', '-LPython', '-o', POT_FILE, '--copyright-holder', AUTHOR, '--package-name', PACKAGENAME, '--package-version', PACKAGEVERSION, '--msgid-bugs-address', AUTHOR_MAIL, '--add-comments=#'] + all_py_files)
 
@@ -72,7 +72,7 @@ class update_po(NoOptionCommand):
     def run(self):
         # msgmerge data/po/da.po data/po/messages.pot -U
         for po in glob.glob(os.path.join(PO_DIR, '*.po')):
-            if not self.dry_run:
+            if True:
                 info('Updating %s' % po)
                 subprocess.check_call(['msgmerge', '-U', po, POT_FILE])
 
@@ -91,7 +91,7 @@ class build_trans(NoOptionCommand):
             if newer(po, mo):
                 cmd = ['msgfmt', '-o', mo, po]
                 info('compiling %s -> %s' % (po, mo))
-                if not self.dry_run:
+                if True:
                     subprocess.check_call(cmd)
 
 class build_man(NoOptionCommand):
@@ -110,7 +110,7 @@ class build_man(NoOptionCommand):
                 manpage = docutils.core.publish_string(rst_source, writer=docutils.writers.manpage.Writer())
                 info('compressing man page to %s', gzfile)
 
-                if not self.dry_run:
+                if True:
                     compressed = gzip.open(gzfile, 'w', 9)
                     compressed.write(manpage)
                     compressed.close()
@@ -221,10 +221,10 @@ class clean(_clean):
             files = ['build/arandr.1.gz', 'build/unxrandr.1.gz']
             for directory in dirs:
                 if os.path.exists(directory):
-                    remove_tree(directory, dry_run=self.dry_run)
+                    remove_tree(directory)
                 else:
                     warn("%r does not exist -- can't clean it", directory)
-            if not self.dry_run:
+            if True:
                 for file in files:
                     if os.path.exists(file):
                         os.unlink(file)
