This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Add --remove-source option
Type: enhancement Stage: resolved
Components: Distutils2 Versions: Python 3.3
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: BreamoreBoy, christian.heimes, davidfraser, eric.araujo, jemfinch, tarek
Priority: normal Keywords: patch

Created on 2003-08-22 10:08 by davidfraser, last changed 2022-04-10 16:10 by admin. This issue is now closed.

File name Uploaded Description Edit
distutils-removesource.patch davidfraser, 2003-08-22 10:08 Patch to remove source code from built distributions
Messages (8)
msg53971 - (view) Author: David Fraser (davidfraser) Date: 2003-08-22 10:08
For distributing non-opensource software, it is helpful
to just distribute the .pyc/.pyo files and not the
original .py files.
The reverse (just distributing .py files) is possible
through the --no-target-compile and
--no-target-optimize switches to the distutils bdist
We have added a --remove-source option which goes
through and deletes all the source files from the build
directory. This has been tested and works smoothly with
Python 2.2.3 and seems to apply cleanly to Python 2.3
msg53972 - (view) Author: David Fraser (davidfraser) Date: 2003-08-22 10:34
Logged In: YES 

Added a patch for this (sorry, probably should have just
done that) as 793070:
msg53973 - (view) Author: Jeremy Fincher (jemfinch) Date: 2003-09-12 19:18
Logged In: YES 

It's someone trivial to retrieve the source code from a
compiled bytecode module; distributing only the bytecode
files does practically nothing to protect your source code.

Check out
msg53974 - (view) Author: David Fraser (davidfraser) Date: 2003-09-12 20:40
Logged In: YES 

Sure, I'm aware of decompyling. However removing the source
might have a slight psychological effect on honest people.
Also it ties in to license things about decompiling etc.
msg59294 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-05 18:03
Should the feature be added in 2.6? I'm -0 on it.
msg114258 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-18 17:47
I don't see this as particularly useful but other opinions are welcome.
msg114259 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-18 17:54
New features go into distutils2, not distutils.

I’m -0 on this one.
msg139772 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-04 14:33
I am now -1: I don’t see this feature as particularly useful, and it would increase the maintenance cost.  If nobody speaks up to defend it, I will reject it.
Date User Action Args
2022-04-10 16:10:46adminsetgithub: 39105
2011-09-19 15:59:55eric.araujosetstatus: open -> closed
assignee: tarek -> eric.araujo
resolution: accepted -> rejected
stage: resolved
2011-07-04 14:33:06eric.araujosetmessages: + msg139772
versions: + Python 3.3, - 3rd party
2010-09-30 00:36:53eric.araujosetversions: + 3rd party, - Python 2.6, Python 2.5, Python 3.1, Python 2.7, Python 3.2
2010-08-18 17:54:42eric.araujosetnosy: jemfinch, davidfraser, christian.heimes, tarek, eric.araujo, BreamoreBoy
messages: + msg114259
components: + Distutils2, - Distutils
versions: + Python 2.6, Python 2.5, Python 3.1, Python 2.7
2010-08-18 17:47:33BreamoreBoysetnosy: + BreamoreBoy

messages: + msg114258
versions: - Python 3.1, Python 2.7
2010-04-09 00:21:53eric.araujosetnosy: + eric.araujo
2009-09-17 11:17:04tareksetresolution: accepted
versions: + Python 3.2
2009-02-05 16:46:03tareksetassignee: tarek
versions: - Python 2.6, Python 3.0
2009-02-05 16:40:25akitadasetnosy: + tarek
versions: + Python 3.0, Python 3.1, Python 2.7
2008-01-05 18:03:12christian.heimessetkeywords: + patch
nosy: + christian.heimes
messages: + msg59294
versions: + Python 2.6
2003-08-22 10:08:35davidfrasercreate