File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -155,5 +155,6 @@ else()
155155
156156endif ()
157157
158- install (PROGRAMS ${ninja_executable} DESTINATION bin)
158+ install (FILES ${Ninja_SOURCE_DIR} /misc/ninja_syntax.py DESTINATION ninja)
159+ install (PROGRAMS ${ninja_executable} DESTINATION ninja/data/bin)
159160
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ Ninja Python Distributions
1313
1414`Ninja <http://www.ninja-build.org >`_ is a small build system with a focus on speed.
1515
16- The Ninja python wheels provide `ninja 1.7.2 <https://ninja-build.org/manual.html >`_.
16+ The Ninja python wheels provide `ninja 1.7.2 <https://ninja-build.org/manual.html >`_ executable
17+ and `ninja_syntax.py ` for generating .ninja files.
1718
1819This project is maintained by Jean-Christophe Fillion-Robin from Kitware Inc.
1920It is covered by the `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0 >`_.
Original file line number Diff line number Diff line change 77__version__ = get_versions ()['version' ]
88del get_versions
99
10+ try :
11+ from .ninja_syntax import Writer , escape , expand # noqa: F401
12+ except ImportError :
13+ # Support importing `ninja_syntax` from the source tree
14+ if not os .path .exists (
15+ os .path .join (os .path .dirname (__file__ ), 'ninja_syntax.py' )):
16+ sys .path .insert (0 , os .path .abspath (os .path .join (
17+ os .path .dirname (__file__ ), '../src/misc' )))
18+ from ninja_syntax import Writer , escape , expand # noqa: F401
19+
1020DATA = os .path .join (os .path .dirname (__file__ ), 'data' )
1121
1222# Support running tests from the source tree
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ def _parse_requirements(filename):
3939
4040 packages = ['ninja' ],
4141
42- cmake_install_dir = 'ninja/data' ,
4342 cmake_with_sdist = True ,
4443
4544 entry_points = {
You can’t perform that action at this time.
0 commit comments