xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 8 years ago

Closed 8 years ago

Last modified 8 months ago

#331 closed defect (fixed)

setup.py: no exit after clean

Reported by: onlyjob Owned by: Antoine Martin
Priority: minor Milestone:
Component: android Version: trunk
Keywords: Cc:


In xpra-0.9.0 source tree (extracted from released tars) python setup.py clean removes generated file "constants.pxi" and then immediately tries to re-create it again by using make_constants_pxi and cython:

removing Cython/build generated file: wimpiggy/lowlevel/constants.pxi
(re)generating /mnt/tmp/src/xpra/xpra-0.9.0/wimpiggy/lowlevel/constants.pxi

Besides it is undesirable for "clean" to depend on cython. Actually on Debian "clean" is called before source is built in isolated environment (i.e. pbuilder) so failure to invoke cython causes FTBFS even before attempted package built.

Probably this situation can be improved by exiting after clean as per my amateur patch below:

--- a/setup.py
+++ b/setup.py
@@ -374,8 +374,9 @@
         filename = os.path.join(os.getcwd(), x.replace("/", os.path.sep))
         if os.path.exists(filename):
             print("removing Cython/build generated file: %s" % x)
+    sys.exit(0)
 if "clean" not in sys.argv:
     # Add build info to build_info.py file:
     import add_build_info

Change History (3)

comment:1 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

The patch above is incorrect and breaks "sdist", and maybe some of the steps that setuptools takes (if any) for "clean" since we skip it completely.

Please see r3353 for a better approach, I will backport to 0.9.x (the list of files to clean is different in v0.9.x)

comment:2 Changed 8 years ago by onlyjob

Thank you very much for fixing it properly.
I'm no match to your superior python skills. :)

comment:3 Changed 8 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/331

Note: See TracTickets for help on using tickets.