Commit Graph

87 Commits

Author SHA1 Message Date
Augie Fackler
c491e8091f dockerdeb: rules to build a debian package using docker
Currently only supports jessie (current stable), but other version
should be trivial.
2015-05-06 13:15:39 -04:00
Augie Fackler
c2c147fe7a builddeb: new script for building a deb package
Future work will allow us to use docker to build debs.

Right now this doesn't install any config files. I plan to do that as
a followup, but getting something basic and working checked in seems
like more of a priority than getting everything done in one big step.

This also does not create a source deb yet. I haven't looked into that
process.

Note that this declares incompatibility with the `mercurial-common`
package. It's typical for debian packages to be split between
architecture-independent bits and native bits, meaning the python bits
downstream live in mercurial-common and the c extension bits live in
mercurial. We don't do that because we want to (ideally) give users a
single deb file to install.
2015-05-06 13:13:54 -04:00
FUJIWARA Katsunori
6d60352ea0 i18n: extract doc string of each web commands as translatable one
Before this patch, doc string of each web commands isn't extracted as
translatable one, even though web commands are listed up in "hg help
hgweb".

This patch adds "mercurial/hgweb/webcommands.py" on to arguments of
"i18n/hggettext". "i18nfunctions" added into "webcommands.py" is used
by "i18n/hggettext" to get the list of functions having translatable
doc string.
2015-04-28 00:38:16 +09:00
Yuya Nishihara
6c27e6c97a templater: tell hggettext to collect help of template functions 2015-04-03 21:36:39 +09:00
Augie Fackler
d5c405b03d Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS
I keep wanting to run 'make tests', but I forget to set TESTFLAGS='-j
16' or whatever is reasonable for my machine. This lets me just set it
once in my shell settings and forget it.
2015-02-04 15:17:13 -05:00
Augie Fackler
bc6c2de805 Makefile: introduce testpy-% target for testing with a specifc Python
This makes it easy to do 'make testpy-2.4.6 TESTFLAGS="-j 16"' and the
Makefile will build Python if needed and then run tests (with -j 16)
with the resulting Python.

You can set the environment variable HGPYTHONS to a nice location on
your machine to cache the Python builds globally. If that's not set,
it builds them inside build/pythons.
2015-02-04 12:26:16 -05:00
Mads Kiilerich
031d0b9afc osx: patch .pax.gz files in pkg bundles so they extract as root (issue4081)
The packages has to be installed by root but they would be installed
insecurely, owned by the uid of the unprivileged user that made the package.
The local user with that uid could thus write to /usr/local/bin/hg .

bdist_mpkg calls out to pax to create the package, but pax do apparently not
have the power to control what it is writing.

Instead, patch the pax files and set their uid fields to 0 before they are
wrapped in a dmg.
2015-01-23 06:28:28 +01:00
Mads Kiilerich
e7afe1bb24 osx: use bdist_mpkg.script_bdist_mpkg module instead of bdist_mpkg command
It seems like a default installation of bdist_mpkg makes it available as
Python module, but the corresponding executable is placed in a location like
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/bin which is
not in $PATH and thus not directly available. 'make osx' would thus fail.

Instead, skip the bdist_mpkg executable and invoke it as a Python module. That
works out of the box here.
2015-01-21 05:04:48 +01:00
Mads Kiilerich
fc3f4381fd osx: don't launch installer after building it with bdist_mpkg
bdist_mpkg do for some reason default to use the parameter --show ("Open with
Installer.app after building") if no parameters are specified. We do not like
that.

All the important parameters to bdist_mpkg are already specified in setup.py
and we don't have any to specify in the Makefile.

Instead, specify the parameter '--' which do no harm but will disable the
default opening of the installer. This makes it possible to build packages
"silently".
2015-01-21 05:04:46 +01:00
Mads Kiilerich
e8c3de8b41 docker: support Fedora 21 2014-11-02 02:36:47 +01:00
Mads Kiilerich
f8bf9f40a4 Makefile: update .PHONY
Based on
sed -n 's/^\([a-z0-9-]*\):\(\s.*\)\?$/\1/gp' Makefile | xargs echo
add check, check-code, update-pot, some packaging targets
2014-11-01 20:00:31 +01:00
Mads Kiilerich
79c175d696 docker: add centos7 target for CentOS / Red Hat 7 support 2014-10-16 17:44:14 +02:00
Mads Kiilerich
eff8053e22 docker: add CentOS 5
There is no official CentOS 5 docker template so we use one from saltstack.
2014-05-15 01:48:37 +02:00
Mads Kiilerich
b06c2984ad docker: use stable tags for fedora and centos
A moving target is rarely useful.
2014-08-31 13:41:09 +02:00
J. Lewis Muir
1c3ff4a87e build: don't clean __version__.py on 'make clean' in release tarballs
When running 'make clean' in an extracted release tarball, file
mercurial/__version__.py is removed, causing a subsequent install to
indicate 'version unknown'.

This problem was reported in the past [1] and a patch proposed in that mail,
but was never properly sent nor applied.

[1] http://selenic.com/pipermail/mercurial/2010-December/036249.html
2014-09-02 11:28:44 +02:00
Mads Kiilerich
03327f4889 osx: create dmg with installer instead of zip
OS X would offer to expand the zip so the (multi file) installer inside it
could be run ... but that would leave the expanded zip folder around.

Instead, use a .dmg file that automatically will be mounted - that seems more
common on OS X.

Still, there is two levels of levels of clicking before actually launching the
installer. Having a single file installer would be better ... but seems to be
hard. A more feasible improvement would be some fancy layout inside the .dmg .
2014-08-31 10:24:25 +02:00
Kevin Bullock
b5dafd9f52 build: don't use -s flag for which
`which -s` is a BSDism that doesn't exist on other versions of
`which`. That means that even on Mac OS X, `make osx` breaks if you have
another utils package installed (e.g. debianutils installed thru
fink). Redirect output to /dev/null instead.
2014-08-29 12:06:31 +02:00
Mads Kiilerich
d77462b1b9 buildrpm: remove prompt for uncommitted changes - it was a bad idea
We want a command that is useful in scripts, not an interactive command.
2014-05-15 01:48:37 +02:00
Matt Mackall
761e95b927 packaging: move output directory from build/ to packages/
setuptools owns build/ and dist/ and we want to have our own scheme
2014-05-27 11:52:39 -07:00
Matt Mackall
d9263873c7 make: add a basic osx mpkg target 2014-05-27 11:39:22 -07:00
Matt Mackall
dc3027aa51 build: initial support for in-tree autobuilding recipes 2014-05-07 17:58:13 -05:00
Thomas Arendsen Hein
aedd3b060c setup.py, make: avoid problems with outdated, existing hgext/__index__.py*
"make clean" already removed __index__.py[cdo], but not the __index__.py
(automatically generated by "python setup.py build_hgextindex").

"setup.py build_hgextindex" did not generate a new index if file
__index__.py[cdo] already existed, because if __index__.py was removed,
the compiled file containing the old information was imported and used.
Generate an empty file (with a new timestamp to generate a new .py[cdo])
instead and make mercurial.extensions ignore the unset docs attribute.

One of the problems was a failed test-help.t, to reproduce:

$ rm hgext/__index__.py*
$ echo 'docs = {"mq": "dummy"}' > hgext/__index__.py
$ make test-help.t

With this a "make clean" or "python setup.py build_hgextindex" helps.
2014-05-05 16:54:15 +02:00
Augie Fackler
4f3c51dea3 setup: specify --prefix="" for install-home-bin to avoid badness with defaults
Sometimes (I'm not sure when) setup.py gets a default value for
--prefix, which breaks --home. This fixes that for me.
2014-02-03 02:09:46 -05:00
Simon Heimberg
4160576860 Makefile: hg.pot depends on the scripts generating it
This is convenient when editing this scripts. And translators will get updated
translation files even if nothing else has changed.
2013-11-17 20:16:14 +01:00
Matt Mackall
ccdc2e59b8 makefile: add $ to environment variables in help message 2014-01-23 14:31:05 -06:00
Simon Heimberg
30b80bb630 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
The file ending of temporary files for generating XX.po has been changed to
.tmp (from ~). Use the same ending when generating hg.pot.
2013-11-17 12:18:26 +01:00
Simon Heimberg
e2f8f71e76 Makefile: fix po file updating by using same file name everywhere
The update is done on a temporary file since d6abb3586946. The name of this
file was first XX.po~ and has been changed to XX.po.tmp in all except of one
place. Do this now.
2013-11-17 12:17:55 +01:00
Simon Heimberg
f2d4dbb37b Makefile: intermediate steps work with temporary copy of hg.pot
In case of abortion or a failing step, the target file remains untouched
instead of being in an intermediate state.
2013-11-05 09:43:26 +01:00
Matt Mackall
1f8ae60dec make: restrict recursion in make clean 2013-11-14 17:17:44 -06:00
Simon Heimberg
31f38eee9f Makefile: do update on a temporary copy of a po file
This avoids having a half completed file (with a new timestamp) when msgmerge
has failed.
2013-11-05 09:43:36 +01:00
Takumi IINO
c57d1116da doc: make i18n man and html
Allow overwrite LANGUAGE and LC_ALL make variables, for make i18n man and html.
After this patch, we can make i18n man and html by following command:

  $ make clean all LANGUAGE=ja
2013-07-03 21:50:20 +09:00
Benoit Boissinot
957d1fe448 check-code: add Makefile target to run check-code 2013-02-09 15:57:04 +01:00
Bryan O'Sullivan
66236952ea makefile: allow local builds to work on windows/mingw32 2012-12-11 13:44:00 -08:00
Bryan O'Sullivan
6b7c221315 makefile: don't use system hgrc when running hg in-place
This suppresses the printing of spurious error messages if a global
hgrc refers to extensions that the in-place hg can't access.
2012-11-13 09:56:09 -08:00
Adrian Buehlmann
675c7eeaef Makefile: add build_hgexe -i for local 2012-06-29 13:12:35 +02:00
Thomas Arendsen Hein
6dc228e4f6 Makefile: remove generated mercurial/__version__.py 2012-05-15 12:44:07 +02:00
Matt Mackall
f23ed05e2d Makefile: be more careful when cleaning up pure/ components
The recent introduction of pure/__init__.py causes
mercurial/__init__.py to get clobbered by make clean.
2012-04-18 11:45:50 -05:00
FUJIWARA Katsunori
4629df01c9 filemerge: create detail of internal merge tools from documentation string
this patch introduces 'internaltoolsmarker' which creates detail of
each internal merge tools from documentation string for 'hg help merge-tools'.
2012-02-12 21:38:12 +09:00
Thomas Arendsen Hein
467f4af92f Makefile: adjust example, test-merge1 is now test-merge1.t 2011-10-28 12:59:50 +02:00
Alexander Sauta
6701bbd038 i18n-ru: translated missing strings for commands, some typos corrected 2011-07-01 00:14:30 +04:00
Wagner Bruna
52ee2c38d8 i18n: extract docstrings from fileset module 2011-06-20 19:08:41 -03:00
Stephen Thorne
e9d1e0bdc6 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
When running 'python setup.py sdist' many files were omitted from the resulting
tarball that are required for a complete build, including the .h file for the
inotify extension due to a python2.7+ distutils bug. This would cause 'make dist'
to fail to build a correct dist on python2.7

By building a MANIFEST.in that is the same as the old MANIFEST with 'include'
at the start of each line will cause a correct MANIFEST to be built and used
by distutils.
2011-06-09 10:15:24 +10:00
Martin Geisler
5d355b29d6 Makefile: remove pure modules on clean 2011-05-13 11:26:29 +02:00
Johan Euphrosine
75a5be1c2e add make check: tests rule 2011-05-02 09:50:21 +02:00
Matt Mackall
4dbec2c466 build: don't delete precious version information on 'make clean'
setup.py rebuilds version information if it's locally available,
regardless if file already exists.
2010-12-08 11:18:26 -06:00
Wagner Bruna
0fe36cf09d i18n: extract docstrings from revset module 2010-10-26 23:07:14 -02:00
Martin Geisler
b6f1ee0482 Makefile: var for documentation files 2010-10-23 16:54:45 +02:00
Martin Geisler
6943ff68e7 Makefile: remove underscore in var name 2010-10-23 16:53:25 +02:00
Wagner Bruna
8f7ee64a82 i18n: extract comments marked for translator hints
Comments marked with "i18n:", like:

  # i18n: do not translate the field names
  msg = _("Valid entries for the format field are topic, bar, number.")

will become available for translators in the .po files:

  #. i18n: do not translate the field names
  msgid "Valid entries for the format field are topic, bar, number."
  msgstr ""
2010-10-21 11:45:02 -02:00
Brodie Rao
7d5a1c7775 Makefile: remove the build folder manually
Given a system Python version of 2.6, the following won't clean up build:

  $ make local PYTHON=python2.7
  $ make clean

Distutils only cleans up build subdirectories for the current Python
version.

This patch cleans up the build folder even if PYTHON=python2.7 isn't
specified to clean.
2010-09-25 19:47:45 -05:00