aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-05-18 19:44:57 +0300
committerGitHub <noreply@github.com>2017-05-18 19:44:57 +0300
commit5ec6151e56140a19ef185052ffb02bd1ff957bd7 (patch)
tree53346478d8e84aefd170ac6226938ca89d6d0a77 /mesonbuild/backend
parenta31bc4ede5883d449c15c90535b21bc8f9e28d6d (diff)
parent0e56ec2dbdbbd463d608c42e0aa117357e18936a (diff)
downloadmeson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.zip
meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.gz
meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.bz2
Merge pull request #1810 from QuLogic/pycharm-warnings
Fix various warnings found in PyCharm
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py4
-rw-r--r--mesonbuild/backend/ninjabackend.py19
-rw-r--r--mesonbuild/backend/vs2015backend.py1
3 files changed, 11 insertions, 13 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index b903f4c..a95294b 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -529,9 +529,7 @@ class Backend:
return
ifilename = os.path.join(self.environment.get_build_dir(), 'depmf.json')
ofilename = os.path.join(self.environment.get_prefix(), self.build.dep_manifest_name)
- mfobj = {'type': 'dependency manifest',
- 'version': '1.0'}
- mfobj['projects'] = self.build.dep_manifest
+ mfobj = {'type': 'dependency manifest', 'version': '1.0', 'projects': self.build.dep_manifest}
with open(ifilename, 'w') as f:
f.write(json.dumps(mfobj))
# Copy file from, to, and with mode unchanged
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index de03db4..4b12da6 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -21,7 +21,7 @@ from .. import dependencies
from .. import compilers
from ..compilers import CompilerArgs
from ..mesonlib import File, MesonException, OrderedSet
-from ..mesonlib import get_meson_script, get_compiler_for_source, Popen_safe
+from ..mesonlib import get_meson_script, get_compiler_for_source
from .backends import CleanTrees, InstallData
from ..build import InvalidArguments
import os, sys, pickle, re
@@ -315,14 +315,14 @@ int dummy;
# Now we handle the following languages:
# ObjC++, ObjC, C++, C, D, Fortran, Vala
- # Pre-existing target C/C++ sources to be built; dict of full path to
- # source relative to build root and the original File object.
- target_sources = OrderedDict()
- # GeneratedList and CustomTarget sources to be built; dict of the full
- # path to source relative to build root and the generating target/list
- generated_sources = OrderedDict()
- # Array of sources generated by valac that have to be compiled
- vala_generated_sources = []
+ # target_sources:
+ # Pre-existing target C/C++ sources to be built; dict of full path to
+ # source relative to build root and the original File object.
+ # generated_sources:
+ # GeneratedList and CustomTarget sources to be built; dict of the full
+ # path to source relative to build root and the generating target/list
+ # vala_generated_sources:
+ # Array of sources generated by valac that have to be compiled
if 'vala' in target.compilers:
# Sources consumed by valac are filtered out. These only contain
# C/C++ sources, objects, generated libs, and unknown sources now.
@@ -331,6 +331,7 @@ int dummy;
else:
target_sources = self.get_target_sources(target)
generated_sources = self.get_target_generated_sources(target)
+ vala_generated_sources = []
self.scan_fortran_module_outputs(target)
# Generate rules for GeneratedLists
self.generate_generator_list_rules(target, outfile)
diff --git a/mesonbuild/backend/vs2015backend.py b/mesonbuild/backend/vs2015backend.py
index b8e3504..eb543ee 100644
--- a/mesonbuild/backend/vs2015backend.py
+++ b/mesonbuild/backend/vs2015backend.py
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from xml.etree import ElementTree as ET
from .vs2010backend import Vs2010Backend