aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mdist.py
AgeCommit message (Collapse)AuthorFilesLines
2022-06-10flake8: remove no longer used importsEli Schwartz1-1/+0
2022-04-11mdist: use better approach to finding original configured optionsEli Schwartz1-4/+14
Instead of reading intro-buildoptions.json, a giant json file containing every option ever + its current value, use the private file that is internally used by msetup for e.g. --wipe to restore settings. This accurately tracks exactly the options specified on the command line, and avoids lengthy summary messages containing all the overridden defaults. It also avoids passing potentially incompatible options, such as explictly specifying -Dpython.install_env while also having a non-empty -Dpython.{x}libdir Fixes #10181
2022-02-10implement 'dist --allow-dirty' flagandy59951-12/+24
closes #9824
2021-10-10Add --vsenv command line option and active VS only when neededXavier Claessens1-1/+2
2021-09-03mdist: use git archive with git repositories for correctnessEli Schwartz1-29/+35
Fixes various inconsistencies: - gitattributes is respected - export-subst - export-ignore - submodules with relative paths are not checked out relative to the local clone (which does not work anyway) - no need to manually remove gitfiles with inaccurate heuristics Fixes #2287 Fixes #3081 Fixes #8144
2021-08-31pylint: turn on superfluous parens warningDylan Baker1-2/+2
Which is really useful for catching parens used with keywords like assert. Don't use parens with assert, it's bad.
2021-07-07cleanup self.options.wdPaolo Bonzini1-1/+0
It is never None and always an absolute path
2021-07-07resolve symlinks passed to -CPaolo Bonzini1-2/+3
"meson setup" is resolving symlinks for the build directory in validate_core_dirs. For consistency with it, do the same when the build directory is passed via -C to devenv, dist, init, install and test. This ensures for example that the path to test dependencies is computed correctly in "meson test". Fixes: #8765
2021-07-04dist: only exclude actual git filesAndrea Pappacoda1-4/+6
Instead of excluding all files starting with .git, meson dist now only excludes files really used by git
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-3/+3
2021-05-30Don't use `os.path.relpath` in dist commandNaveen M K1-1/+1
This is problematic when we meson is installed in the different root(say C:) while building from another root(say D:). This is how it is done in mesonpep517 and causes problems because of that.
2021-04-26Fix issue where multiple dist files were not being produced for comma ↵Tristan Partin1-2/+3
separated formats value
2021-03-18Allow add_dist_script() in subprojectsXavier Claessens1-5/+11
Fixes: #8440.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-7/+7
performed by running "pyupgrade --py36-plus" and committing the results
2021-01-30Fix executable as script on WindowsXavier Claessens1-5/+4
On Windows this would fail because of missing DLL: ``` mylib = library(...) exe = executable(..., link_with: mylib) meson.add_install_script(exe) ``` The reason is on Windows we cannot rely on rpath to find libraries from build directory, they are searched in $PATH. We already have all that mechanism in place for custom_target() using ExecutableSerialisation class, so reuse it for install/dist/postconf scripts too. This has bonus side effect to also use exe_wrapper for those scripts. Fixes: #8187
2021-01-26dist: Use windows_proof_rmtree() instead of shutil.rmtree()Xavier Claessens1-4/+4
2021-01-26dist: Allow packaging subproject in same git repo as main projectXavier Claessens1-5/+29
2021-01-23split mesonlib into a packageDylan Baker1-2/+2
Currently mesonlib does some import tricks to figure out whether it needs to use windows or posix specific functions. This is a little hacky, but works fine. However, the way the typing stubs are implemented for the msvcrt and fnctl modules will cause mypy to fail on the other platform, since the functions are not implemented. To aleviate this (and for slightly cleaner design), I've split mesonlib into a pacakge with three modules. A universal module contains all of the platform agnositc code, a win32 module contains window specific code, a posix module contains the posix specific code, and a platform module contains no-op implementations. Then the package's __init__ file imports all of the universal functions and all of the functions from the approriate platform module, or the no-op versions as fallbacks. This makes mypy happy, and avoids `if`ing all over the code to switch between the platform specific code.
2020-12-22mdist: Print file path at the end of run() instead of in create_hash().Aman Verma1-1/+1
2020-12-22mdist: Ensure correct format for sha256sum.Aman Verma1-1/+3
We conform to the format described at <https://www.gnu.org/software/coreutils/manual/html_node/md5sum-invocation.html>. and compatible with busybox and Perl's shasum utility.
2020-11-20use real pathlib moduleDylan Baker1-1/+1
We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger1-1/+1
2020-09-22mdist: actually constrain the choices of the --formats optionDylan Baker1-1/+1
Since we already have that list available.
2020-09-04environment: use ExternalProgram to find ninjaPaolo Bonzini1-6/+6
This allows the NINJA environment variable to support all the Windows special cases, especially allowing an absolute path without extension. Based on a patch by Yonggang Luo. Fixes: #7659 Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-07-01wrap: Refactor to split wraps dictionary into 3 separate dictsXavier Claessens1-1/+1
It makes the code cleaner to have 3 separate dictionaries for packagename, dependency and programs.
2020-06-13mdist: Filter out buildtype to avoid warningNirbheek Chauhan1-1/+1
Since we parse buildoptions.json to pass options, we end up passing -Dbuildtype and also -Doptimization and -Ddebug which triggers the warning: WARNING: Recommend using either -Dbuildtype or -Doptimization + -Ddebug [...] Filter out buildtype. It is redundant.
2020-03-29dist: Print location of generated tarballsXavier Claessens1-0/+1
Otherwise the location is not discoverable without reading online documentation.
2020-03-29dist: Add --no-tests optionXavier Claessens1-2/+6
It is not always needed to test generated tarballs, for example when they are generated by CI that already does its own testing.
2020-03-03Cherry-picking - (rm python2 % add python3 .format) (#6725)Michael Brockus1-3/+3
2020-02-17mdist: Use windows_proof_rmtree when deletingNirbheek Chauhan1-4/+4
2020-02-17mdist: Don't delete builddir on dist failureNirbheek Chauhan1-26/+31
Closes https://github.com/mesonbuild/meson/issues/1976
2020-02-10Exclude .hg* from dist tarballsRichard Laager1-1/+10
Debian's lintian checker complaints when upstream tarballs contain an .hgtags file. This excludes ".hg[a-z]*". This is mostly consistent with the git handling in del_gitfiles() which deletes .git*. hg archive --help shows an example of -X ".hg*". However, instead of ".hg*", I have used ".hg[a-z]*" to keep the automatically added hg_archival.txt. This file may be useful to link the tarball to the Mercurial revision for either manual inspection or in case any code interprets it for a --version or similar. This also excludes .hgignore and other things like .hgflow, which seems desirable. Fixes #6575
2020-01-23Set source and build dir envvars when running dist.Jussi Pakkanen1-4/+6
2019-12-10dist: Fix --include-subprojects when .wrap file has directory valueXavier Claessens1-1/+5
2019-12-08dist: Add --include-subprojects optionXavier Claessens1-8/+36
2019-10-19mdist.py: import lzma only when neededThomas Petazzoni1-1/+1
Source of patch: http://lists.busybox.net/pipermail/buildroot/2019-October/262990.html http://code.bulix.org/gdxcu4-914360 Fixes https://github.com/mesonbuild/meson/issues/6012
2019-08-07dist: Add '-C' option and print better error messageXavier Claessens1-2/+9
It was not obvious that 'meson dist' must be run from build directory.
2019-07-30dist: Pass right build options when configuring dist directoryThibault Saunier1-2/+6
Fixes https://github.com/mesonbuild/meson/issues/5732
2019-07-23Create multiple different archive types with dist.Jussi Pakkanen1-47/+59
2019-07-23Made dist a top level command.Jussi Pakkanen1-0/+209