Rendre également les scons disponibles dans Python3. De nombreuses bibliothèques sont devenues compatibles avec Python 3, mais scons n'a pas encore été pris en charge, nous allons donc utiliser la version non officielle.
La [version officielle] de scons (http://www.scons.org/) n'est pas encore compatible avec Python3, donc le code source qui a été forké et porté sur Python3 ([ici](https: // bitbucket.) org / userzimmermann / scons / branch / python3-port)) est utilisé.
hg clone https://bitbucket.org/userzimmermann/scons
cd scons
hg pull && hg update python3-port
Il y a un léger problème avec src / setup.py et une erreur se produit pendant la construction, donc corrigez-le.
diff.patch
diff -r 6679e468ada7 src/setup.py
--- a/src/setup.py Sun Apr 06 10:50:33 2014 -0400
+++ b/src/setup.py Wed Sep 03 16:00:20 2014 +0900
@@ -368,19 +368,19 @@ class install_data(_install_data):
description = "Open Source next-generation build tool."
long_description = """Open Source next-generation build tool.
Improved, cross-platform substitute for the classic Make
utility. In short, SCons is an easier, more reliable
and faster way to build software."""
scripts = [
- 'script/scons',
- 'script/sconsign',
- 'script/scons-time',
+ 'script/scons.py',
+ 'script/sconsign.py',
+ 'script/scons-time.py',
# We include scons.bat in the list of scripts, even on UNIX systems,
# because we provide an option to allow it be installed explicitly,
# for example if you're installing from UNIX on a share that's
# accessible to Windows and you want the scons.bat.
'script/scons.bat',
]
@@ -402,78 +402,87 @@ arguments = {
"SCons.Tool",
"SCons.Tool.docbook",
"SCons.Tool.MSCommon",
"SCons.Tool.packaging",
"SCons.Variables",
],
'package_dir' : {'' : 'engine',
'SCons.Tool.docbook' : 'engine/SCons/Tool/docbook'},
- 'package_data' : {'SCons.Tool.docbook' : ['docbook-xsl-1.76.1/*',
+ 'package_data' : {'SCons.Tool.docbook' : ['docbook-xsl-1.76.1/*.*',
+ 'docbook-xsl-1.76.1/AUTHORS',
+ 'docbook-xsl-1.76.1/BUGS',
+ 'docbook-xsl-1.76.1/COPYING',
+ 'docbook-xsl-1.76.1/INSTALL',
+ 'docbook-xsl-1.76.1/Makefile',
+ 'docbook-xsl-1.76.1/NEWS',
+ 'docbook-xsl-1.76.1/README',
+ 'docbook-xsl-1.76.1/TODO',
+ 'docbook-xsl-1.76.1/VERSION',
'docbook-xsl-1.76.1/common/*',
'docbook-xsl-1.76.1/docsrc/*',
'docbook-xsl-1.76.1/eclipse/*',
- 'docbook-xsl-1.76.1/epub/*',
- 'docbook-xsl-1.76.1/epub/bin/*',
+ 'docbook-xsl-1.76.1/epub/docbook.xsl',
+ 'docbook-xsl-1.76.1/epub/README',
+ 'docbook-xsl-1.76.1/epub/bin/dbtoepub',
'docbook-xsl-1.76.1/epub/bin/lib/*',
'docbook-xsl-1.76.1/epub/bin/xslt/*',
'docbook-xsl-1.76.1/extensions/*',
'docbook-xsl-1.76.1/fo/*',
'docbook-xsl-1.76.1/highlighting/*',
'docbook-xsl-1.76.1/html/*',
'docbook-xsl-1.76.1/htmlhelp/*',
- 'docbook-xsl-1.76.1/images/*',
+ 'docbook-xsl-1.76.1/images/*.svg',
'docbook-xsl-1.76.1/images/callouts/*',
'docbook-xsl-1.76.1/images/colorsvg/*',
'docbook-xsl-1.76.1/javahelp/*',
'docbook-xsl-1.76.1/lib/*',
'docbook-xsl-1.76.1/manpages/*',
'docbook-xsl-1.76.1/params/*',
'docbook-xsl-1.76.1/profiling/*',
'docbook-xsl-1.76.1/roundtrip/*',
'docbook-xsl-1.76.1/slides/browser/*',
'docbook-xsl-1.76.1/slides/fo/*',
'docbook-xsl-1.76.1/slides/graphics/*',
'docbook-xsl-1.76.1/slides/graphics/active/*',
'docbook-xsl-1.76.1/slides/graphics/inactive/*',
'docbook-xsl-1.76.1/slides/graphics/toc/*',
'docbook-xsl-1.76.1/slides/html/*',
'docbook-xsl-1.76.1/slides/htmlhelp/*',
- 'docbook-xsl-1.76.1/slides/keynote/*',
+ 'docbook-xsl-1.76.1/slides/keynote/default.xsl',
'docbook-xsl-1.76.1/slides/keynote/xsltsl/*',
'docbook-xsl-1.76.1/slides/svg/*',
'docbook-xsl-1.76.1/slides/xhtml/*',
'docbook-xsl-1.76.1/template/*',
'docbook-xsl-1.76.1/tests/*',
'docbook-xsl-1.76.1/tools/bin/*',
'docbook-xsl-1.76.1/tools/make/*',
- 'docbook-xsl-1.76.1/webhelp/*',
- 'docbook-xsl-1.76.1/webhelp/docs/*',
- 'docbook-xsl-1.76.1/webhelp/docs/common/*',
+ 'docbook-xsl-1.76.1/webhelp/LICENSE',
+ 'docbook-xsl-1.76.1/webhelp/docs/index.html',
+ 'docbook-xsl-1.76.1/webhelp/docs/common/main.js',
'docbook-xsl-1.76.1/webhelp/docs/common/css/*',
'docbook-xsl-1.76.1/webhelp/docs/common/images/*',
- 'docbook-xsl-1.76.1/webhelp/docs/common/jquery/*',
+ 'docbook-xsl-1.76.1/webhelp/docs/common/jquery/*.js',
'docbook-xsl-1.76.1/webhelp/docs/common/jquery/theme-redmond/*',
'docbook-xsl-1.76.1/webhelp/docs/common/jquery/theme-redmond/images/*',
'docbook-xsl-1.76.1/webhelp/docs/common/jquery/treeview/*',
'docbook-xsl-1.76.1/webhelp/docs/common/jquery/treeview/images/*',
- 'docbook-xsl-1.76.1/webhelp/docs/content/*',
- 'docbook-xsl-1.76.1/webhelp/docs/content/search/*',
+ 'docbook-xsl-1.76.1/webhelp/docs/content/*.html',
+ 'docbook-xsl-1.76.1/webhelp/docs/content/search/*.js',
'docbook-xsl-1.76.1/webhelp/docs/content/search/stemmers/*',
'docbook-xsl-1.76.1/webhelp/docsrc/*',
- 'docbook-xsl-1.76.1/webhelp/template/*',
- 'docbook-xsl-1.76.1/webhelp/template/common/*',
+ 'docbook-xsl-1.76.1/webhelp/template/common/main.js',
'docbook-xsl-1.76.1/webhelp/template/common/css/*',
'docbook-xsl-1.76.1/webhelp/template/common/images/*',
- 'docbook-xsl-1.76.1/webhelp/template/common/jquery/*',
+ 'docbook-xsl-1.76.1/webhelp/template/common/jquery/*.js',
'docbook-xsl-1.76.1/webhelp/template/common/jquery/theme-redmond/*',
'docbook-xsl-1.76.1/webhelp/template/common/jquery/theme-redmond/images/*',
'docbook-xsl-1.76.1/webhelp/template/common/jquery/treeview/*',
'docbook-xsl-1.76.1/webhelp/template/common/jquery/treeview/images/*',
- 'docbook-xsl-1.76.1/webhelp/template/content/search/*',
+ 'docbook-xsl-1.76.1/webhelp/template/content/search/*.*',
'docbook-xsl-1.76.1/webhelp/template/content/search/stemmers/*',
'docbook-xsl-1.76.1/webhelp/xsl/*',
'docbook-xsl-1.76.1/website/*',
'docbook-xsl-1.76.1/xhtml/*',
'docbook-xsl-1.76.1/xhtml-1_1/*',
'utils/*']},
'data_files' : [('man/man1', man_pages)],
'scripts' : scripts,
Tout ce que vous avez à faire est de vous déplacer dans le répertoire src et de construire et d'installer
cd src
python setup.py build
python setup.py install
J'ai en fait essayé d'utiliser la version portée de scons et je ne suis pas sûr si c'est une mauvaise utilisation ou un bogue, mais il n'y a qu'une fois que la partie qui aurait dû être ignorée n'est pas ignorée parce que le fichier n'a pas changé. fait. Ce problème a été résolu en modifiant la façon dont SConstruct était écrit. Il n'y a pas d'autres problèmes, donc je pense que cela peut être mis en pratique.
Alors, profitez pleinement des scons dans un environnement japonais.
Recommended Posts