Closed
Bug 1128586
Opened 11 years ago
Closed 10 years ago
Make mach mercurial-setup work with a non-py2exe mercurial
Categories
(Firefox Build System :: Mach Core, enhancement)
Tracking
(firefox38 fixed, firefox38.0.5 fixed, firefox39 fixed, firefox40 fixed, firefox-esr31 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-master fixed)
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(2 files)
1.12 KB,
patch
|
RyanVM
:
review+
|
Details | Diff | Splinter Review |
2.29 KB,
patch
|
RyanVM
:
review+
|
Details | Diff | Splinter Review |
Looks like the "find a binary" logic in mach mercurial-setup could use some work. See bug 545432 comment #40.
Comment 1•10 years ago
|
||
Just FYI, with these changes:
cp /path/to/mozilla-build/python/{lib/site-packages/setuptools/cli.exe,Scripts/hg.exe}
mv /path/to/mozilla-build/python/Scripts/hg{,-script.py}
I can use |mach mercurial-setup| to update ~/.hgrc and update version-control-tools w/o noticing any issue.
It seems a similar wrapper exe can be built by |python setup.py build_hgexe|, but I have no idea how to confirm it or how to do it with pip.
I hope this information could be of some help.
Comment 2•10 years ago
|
||
Yeah, I think we'd have to unpack the tar archive and manually run setup.py in order to use the build_hgexe option. Unfortunate that pip doesn't provide a way to run custom setup.py options AFAICT.
Comment 3•10 years ago
|
||
Pretty sure I've got this working now with build_hgexe. Will post a test build soon once I can test a bit locally.
Comment 4•10 years ago
|
||
OK, this generates the stub exe via build_hgexe. A cursory bit of testing says that it works as expected. Give it a shot and let me know please :)
http://people.mozilla.org/~rvandermeulen/MozillaBuildSetup2.0.0pre5.exe
sha1sum 8c12494706ae0cfc9d3ae17b2d1f803d76291297
Flags: needinfo?(gps)
Comment 5•10 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #4)
> OK, this generates the stub exe via build_hgexe. A cursory bit of testing
> says that it works as expected. Give it a shot and let me know please :)
>
> http://people.mozilla.org/~rvandermeulen/MozillaBuildSetup2.0.0pre5.exe
>
> sha1sum 8c12494706ae0cfc9d3ae17b2d1f803d76291297
I have to |mv /c/mozilla-build-test/python/Scripts/hg{,exe.py}| for mach to pick up hg.exe instead of hg.
Updated•10 years ago
|
Blocks: MozillaBuild2.0
Assignee | ||
Comment 6•10 years ago
|
||
`mercurial version` doesn't always print the version number. `mercurial
--version` does. Use the latter.
Attachment #8598122 -
Flags: review?(ryanvm)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gps
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•10 years ago
|
||
This is needed for compatibility with an upcoming release of
MozillaBuild, which distributes Mercurial as a Python package, not as a
standalone Windows program. As a result, it introduces "hg" into $PATH,
which "which" will happily prefer as the "hg" binary. This upsets
subprocess. So, we explicitly prefer "hg.exe" over "hg".
We could accomplish the same thing by calling which.whichall() and
sorting results. But this is more code and IMO not worth the effort to
implement.
Attachment #8598123 -
Flags: review?(ryanvm)
Updated•10 years ago
|
Attachment #8598122 -
Flags: review?(ryanvm) → review+
Updated•10 years ago
|
Attachment #8598123 -
Flags: review?(ryanvm) → review+
Assignee | ||
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
I guess the landed patches address the needinfo :)
Comment 11•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/8e80ee81ed02
https://hg.mozilla.org/releases/mozilla-aurora/rev/a27d9552ca78
status-firefox39:
--- → fixed
Comment 12•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-release/rev/49abfe1a8ef8
https://hg.mozilla.org/releases/mozilla-release/rev/a0b48af4bb54
status-firefox38:
--- → fixed
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5b5b40559674
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/6edced5c6828
https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/4ebdd5415e9a
https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/1118e759cc2a
https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/d01a1f925ca1
https://hg.mozilla.org/releases/mozilla-esr31/rev/8ab58180c92f
status-b2g-v2.0:
--- → fixed
status-b2g-v2.1:
--- → fixed
status-b2g-v2.2:
--- → fixed
status-b2g-master:
--- → fixed
status-firefox40:
--- → fixed
status-firefox-esr31:
--- → fixed
Comment 15•10 years ago
|
||
status-b2g-v2.1S:
--- → fixed
Comment 16•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d439522e45ae
https://hg.mozilla.org/mozilla-central/rev/ae91360cc160
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Assignee | ||
Comment 17•10 years ago
|
||
We may have set a record for most uplifts before a mozilla-central merge :)
Comment 18•10 years ago
|
||
(In reply to Hector Zhao [:hectorz] from comment #5)
> I have to |mv /c/mozilla-build-test/python/Scripts/hg{,exe.py}| for mach to
> pick up hg.exe instead of hg.
Better now after the patches that gps landed?
Flags: needinfo?(bzhao)
Updated•10 years ago
|
status-firefox38.0.5:
--- → fixed
Comment 20•10 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #18)
> (In reply to Hector Zhao [:hectorz] from comment #5)
> > I have to |mv /c/mozilla-build-test/python/Scripts/hg{,exe.py}| for mach to
> > pick up hg.exe instead of hg.
>
> Better now after the patches that gps landed?
Yes, I changed it back and everything works fine.
Flags: needinfo?(bzhao)
Comment 22•10 years ago
|
||
And the ugly-as-sin packaging patch to build hg.exe:
http://hg.mozilla.org/mozilla-build/rev/02826b9b3d53
I'd like to talk upstream into building hg.exe by default when |setup.py install| is invoked without --pure as it would make all of this go away and would be inconsequential to the final build.
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•