Issue 20316: Byte-compiled files should be absent in tarballs (original) (raw)

Created on 2014-01-20 19:13 by Arfrever, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg208562 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2014-01-20 19:13
Tarballs of 3.3.2 (and all previous versions tested by me) do not contain any *.py[co] files. Tarballs of 3.3.3 contain 1 .pyc file, which is even generated for wrong Python version: $ find -name "*.py[co]" ./Tools/hg/hgtouch.pyc $ file Tools/hg/hgtouch.pyc Tools/hg/hgtouch.pyc: python 2.7 byte-compiled Please ensure that this problem will not occur with future tarballs.
msg208563 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2014-01-20 19:23
Potential fix: --- Makefile.pre.in +++ Makefile.pre.in @@ -1487,4 +1487,4 @@ # Touch generated files touch: - hg --config extensions.touch=Tools/hg/hgtouch.py touch -v + PYTHONDONTWRITEBYTECODE=1 hg --config extensions.touch=Tools/hg/hgtouch.py touch -v
msg208564 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-20 19:27
Your fix won't work, because release managers call hgtouch from a different spot, from a private tool called "release.py". You'll notice that all the 3.4 releases have that hgtouch.pyc file--up until 3.4b2. I already found that bug. I added "Tools/hg/hgtouch.pyc" to the tuple of "files we don't want in tarballs" in export() in release.py. Didn't push it because I was doing other hacking and it wasn't ready, but I could push just that change.
msg208565 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2014-01-20 19:33
When Mercurial is ported to Python 3 somewhen in the future, then e.g. Tools/hg/__pycache__/hgtouch.cpython-34.pyc could be generated, so PYTHONDONTWRITEBYTECODE=1 might still be useful in release.py.
msg208566 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-20 19:35
The construction of release.py would make it easy to just always pass it in when running Python (and hg, and any program). Maybe that's a better choice.
msg208572 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-01-20 19:50
http://hg.python.org/release/rev/9272f4fd7689
msg208573 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-01-20 20:06
> When Mercurial is ported to Python 3 somewhen in the future Good one.
History
Date User Action Args
2022-04-11 14:57:57 admin set github: 64515
2014-01-20 20:06:35 georg.brandl set messages: +
2014-01-20 19:50:46 benjamin.peterson set status: open -> closednosy: + benjamin.petersonmessages: + resolution: fixed
2014-01-20 19:35:16 larry set messages: +
2014-01-20 19:33:42 Arfrever set messages: +
2014-01-20 19:27:55 larry set messages: +
2014-01-20 19:23:25 Arfrever set messages: +
2014-01-20 19:14:27 georg.brandl set priority: normal -> release blockernosy: + larry
2014-01-20 19:13:21 Arfrever create