Jussi Pakkanen
0c957b75c6
Install PDB files. Closes #1442 .
8 years ago
Jussi Pakkanen
b927468137
Use cross stripper when cross compiling and allow overriding native strip executable. Closes #1414 .
8 years ago
Jussi Pakkanen
14e0529a03
Do not strip jar targets. Closes #1343 .
8 years ago
Nirbheek Chauhan
7d6f628ed4
Support file perms for install_data and install_subdir
...
With the 'install_mode' kwarg, you can now specify the file and
directory permissions and the owner and the group to be used while
installing. You can pass either:
* A single string specifying just the permissions
* A list of strings with:
- The first argument a string of permissions
- The second argument a string specifying the owner or
an int specifying the uid
- The third argument a string specifying the group or
an int specifying the gid
Specifying `false` as any of the arguments skips setting that one.
The format of the permissions kwarg is the same as the symbolic
notation used by ls -l with the first character that specifies 'd',
'-', 'c', etc for the file type omitted since that is always obvious
from the context.
Includes unit tests for the same. Sadly these only run on Linux right
now, but we want them to run on all platforms. We do set the mode in the
integration tests for all platforms but we don't check if they were
actually set correctly.
8 years ago
Igor Gnatenko
969dc7e995
style: fix E124 violations
...
E124: closing bracket does not match visual indentation
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
2017d8578a
style: fix E226 violations
...
E226: missing whitespace around arithmetic operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
b55235dfbd
Fix space before :.
8 years ago
Nirbheek Chauhan
0ac965cc10
Fix shared library symlink aliasing on install
...
Set the rules for the symlinking on the target itself, and then reuse
that information while generating aliases during the build, and then
pass it to the install script too.
8 years ago
Igor Gnatenko
8268eb4959
tree-wide: remove unused imports
...
./setup.py:17:1: F401 'os' imported but unused
import os
^
./setup.py:37:1: F401 'stat.ST_MODE' imported but unused
from stat import ST_MODE
^
./run_tests.py:17:1: F401 'os' imported but unused
import subprocess, sys, os
^
./run_tests.py:18:1: F401 'shutil' imported but unused
import shutil
^
./run_unittests.py:23:1: F401 'mesonbuild.dependencies.Qt5Dependency' imported but unused
from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency
^
./mesonbuild/build.py:15:1: F401 '.coredata' imported but unused
from . import coredata
^
./mesonbuild/interpreter.py:32:1: F401 'subprocess' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/interpreter.py:32:1: F401 're' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/dependencies.py:23:1: F401 'subprocess' imported but unused
import os, stat, glob, subprocess, shutil
^
./mesonbuild/mesonlib.py:17:1: F401 'sys' imported but unused
import platform, subprocess, operator, os, shutil, re, sys
^
./mesonbuild/modules/qt5.py:15:1: F401 'subprocess' imported but unused
import os, subprocess
^
./mesonbuild/modules/pkgconfig.py:15:1: F401 '..coredata' imported but unused
from .. import coredata, build
^
./mesonbuild/scripts/scanbuild.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/meson_exe.py:20:1: F401 'subprocess' imported but unused
import subprocess
^
./mesonbuild/scripts/meson_exe.py:22:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/symbolextractor.py:23:1: F401 'subprocess' imported but unused
import os, sys, subprocess
^
./mesonbuild/scripts/symbolextractor.py:25:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/meson_install.py:19:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/yelphelper.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/yelphelper.py:20:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException
^
./mesonbuild/backend/vs2010backend.py:17:1: F401 're' imported but unused
import re
^
./test cases/vala/8 generated sources/src/copy_file.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/107 postconf/postconf.py:3:1: F401 'sys' imported but unused
import sys, os
^
./test cases/common/129 object only target/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
./test cases/common/57 custom target chain/usetarget/subcomp.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/95 dep fallback/subprojects/boblib/genbob.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/98 gen extra/srcgen.py:4:1: F401 'os' imported but unused
import os
^
./test cases/common/113 generatorcustom/gen.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/113 generatorcustom/catter.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/59 object generator/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Nirbheek Chauhan
6b8df9da84
custom_target: Make directory outputs installable
...
This is useful in many cases where the list of files cannot be known in
advance and is just dumped inside a directory. For example when
generating documentation with doxygen and other tools that we don't have
built-in support for.
Includes a test for the same.
Closes #893
8 years ago
Nirbheek Chauhan
c693bd9bb4
Allow passing arguments to install scripts
...
Closes #1213
8 years ago
Igor Gnatenko
4fbaf295f6
remove shebangs from scripts
...
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/regen_checker.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_test.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_benchmark.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_exe.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/symbolextractor.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/commandrunner.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/gtkdochelper.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_install.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/depfixer.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/dirchanger.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/delwithsuffix.py 644 /usr/bin/python3
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/vcstagger.py 644 /usr/bin/python3
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Nirbheek Chauhan
60716fcd6d
Use universal_newlines=True for all Popen calls
...
Instead of adding it everywhere manually, create a wrapper called
mesonlib.Popen_safe and use that everywhere that we call an executable
and extract its output.
This will also allow us to tweak it to do more/different things if
needed for some locales and/or systems.
Closes #1079
8 years ago
Nirbheek Chauhan
b9a7c0cf39
misc: Use relative imports everywhere
...
Using 'mesonbuild' as the module can cause it to use the
system-installed module and can also break if we rename the directory,
so avoid that by always using relative imports.
8 years ago
Jussi Pakkanen
1f4cce86ad
Remove shebangs on files that are not runnable and add execute bits to those that are.
8 years ago
Elliott Sales de Andrade
38a2a636b5
Refactor DESTDIR determination into a single function.
8 years ago
Elliott Sales de Andrade
3a593d0aca
Always obey DESTDIR even with absolute install_dir.
...
Passing an absolute path to `install_dir` would previously always
attempt to install there, instead of obeying DESTDIR, since os.path.join
will 'reset' on absolute paths.
8 years ago
Elliott Sales de Andrade
4c71695e41
Use context manager for file I/O.
...
There are a few cases where a context manager cannot be used, such as
the logger.
8 years ago
Jussi Pakkanen
38a896ae51
Create a log file of all files installed.
9 years ago
Nirbheek Chauhan
598997bdb5
scripts/install: Also strip '\' from the end of a path
...
Fixes installation of subdirs on Windows
9 years ago
Nirbheek Chauhan
b2fb4f9d66
scripts: Use destdir_join fix for all DESTDIR prefixing ( #598 )
9 years ago
Jussi Pakkanen
205037047f
Try to delete target files before installing. Closes #578 .
9 years ago
Jussi Pakkanen
0482635c12
Handle case of install_subdirring a subdir.
9 years ago
Jussi Pakkanen
beb6827413
Installing subdirs now merges with existing files in the target dir.
9 years ago
Jussi Pakkanen
9dace5fc5e
Always initialise final_command.
9 years ago
Jussi Pakkanen
aac7f6ef1f
Since we only care about shebang line and sane ones use plain ASCII, use an encoding that can not fail. Closes #561 .
9 years ago
Jussi Pakkanen
1b78e354a6
Join windows-style destdir paths correctly. Closes #567 .
9 years ago
Jussi Pakkanen
dc148e0702
Remove all special casing for gettext and use elementary operations instead.
9 years ago
Jussi Pakkanen
ea092fefc2
Use individual tempdirs for building and installing in unit tests.
9 years ago
Jussi Pakkanen
67377e69b5
Invoke depfixer in-process to make it faster. Closes #480 .
9 years ago
Nirbheek Chauhan
d5c9b98cab
meson_install.py: Start by checking if the shebang is directly runnable
...
If it's just runnable as-is, then we don't need to do fancy basename detection
and such to find the interpretor to use for running the script.
9 years ago
Nirbheek Chauhan
a15e784851
meson_install: os.symlink may be implemented and still not work
...
Requires Administrator access by default to work
9 years ago
Jussi Pakkanen
b91134b806
Better error message when failing to run install script. Closes #361 .
9 years ago
Jussi Pakkanen
23b98cd6e6
Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir.
9 years ago
Jussi Pakkanen
4c31e7774d
Finalize moduleification so that full test suite runs.
9 years ago
Jussi Pakkanen
66c01401de
Moved scripts in the module and started work to run them via the main meson command.
9 years ago
Jussi Pakkanen
a5508d3fd3
Can run most of test suite (with hacks).
9 years ago
Jussi Pakkanen
8b1039fa30
Organise files into a module structure.
9 years ago
Jussi Pakkanen
83cc5ce4c5
Allow more than one install script and make gtkdoc method return one.
10 years ago
Igor Gnatenko
e954f8314b
meson_install: fix bad-continuation
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
10 years ago
Jussi Pakkanen
67ddeb8a01
Fix destdir for install targets. Closes #32 .
10 years ago
Jussi Pakkanen
73b8ff5341
Rework installation logic so we can go outside the install prefix.
10 years ago
Jussi Pakkanen
525f0ae6d2
Harmonised copyright declarations.
10 years ago
Jussi Pakkanen
46773e75a8
Create symlinks properly. Fixes #19 .
10 years ago
Jussi Pakkanen
0c86f30d4b
Can install entire subtrees with one command. Closes #14 .
10 years ago
Jussi Pakkanen
dcdfb7e3ba
A few suffix fixes.
10 years ago
Jussi Pakkanen
263c917c6a
Install script fix for Windows.
10 years ago
Jussi Pakkanen
84a31d0b57
Delete old symlink before creating new because symlink creation does not overwrite the old one.
10 years ago
Jussi Pakkanen
c4860ff60f
Updated copyright years.
10 years ago
Jussi Pakkanen
e38f040661
Can set install time rpath.
11 years ago