aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik (Xarthisius) <xarthisius@gentoo.org>2013-02-21 10:58:33 +0100
committerKacper Kowalik (Xarthisius) <xarthisius@gentoo.org>2013-02-21 10:58:33 +0100
commit3af4d0f40b554b2b1747945e20770946f622e520 (patch)
treefa7c022ba8d826937a4950831ddfa96dc5c1b87d /dev-python
parent[sci-visualization/yt] update (diff)
downloadsci-3af4d0f40b554b2b1747945e20770946f622e520.tar.gz
sci-3af4d0f40b554b2b1747945e20770946f622e520.tar.bz2
sci-3af4d0f40b554b2b1747945e20770946f622e520.zip
[dev-python/Forthon] Fix option parser to take into account that wrapper filename may have a suffix, use dodoc/docinto. Thanks to Michał Górny <mgorny@gentoo.org> for his help on this
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/Forthon/Forthon-0.8.11.ebuild7
-rw-r--r--dev-python/Forthon/files/Forthon-0.8.11-fix_options_parser.patch17
2 files changed, 21 insertions, 3 deletions
diff --git a/dev-python/Forthon/Forthon-0.8.11.ebuild b/dev-python/Forthon/Forthon-0.8.11.ebuild
index 2383f9bca..cd3560695 100644
--- a/dev-python/Forthon/Forthon-0.8.11.ebuild
+++ b/dev-python/Forthon/Forthon-0.8.11.ebuild
@@ -5,7 +5,7 @@
EAPI=5
PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} )
-inherit distutils-r1
+inherit eutils distutils-r1
DESCRIPTION="Python interface generator for Fortran based codes"
HOMEPAGE="http://hifweb.lbl.gov/Forthon http://pypi.python.org/pypi/Forthon"
@@ -18,14 +18,15 @@ IUSE="examples"
python_prepare_all() {
sed -i -e "/data_files/ s/'License.txt',//" setup.py || die
+ epatch "${FILESDIR}"/${P}-fix_options_parser.patch
distutils-r1_python_prepare_all
}
python_install_all() {
dohtml docs/index.html
if use examples ; then
- insinto /usr/share/doc/${PF}
- doins -r {example,example2,simpleexample}
+ docinto /usr/share/doc/${PF}
+ dodoc -r {example,example2,simpleexample}
fi
distutils-r1_python_install_all
}
diff --git a/dev-python/Forthon/files/Forthon-0.8.11-fix_options_parser.patch b/dev-python/Forthon/files/Forthon-0.8.11-fix_options_parser.patch
new file mode 100644
index 000000000..6a5bfc122
--- /dev/null
+++ b/dev-python/Forthon/files/Forthon-0.8.11-fix_options_parser.patch
@@ -0,0 +1,17 @@
+In order to allow for installation of package for multiple versions of Python
+Linux distribution often provide wrappers with correct shebangs tied to specific
+Python implementation, e.g. Forthon-2.7, Forthon-python2.7, etc.
+This patch fixes logic in Forthon_options to take that into account
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/Lib/Forthon_options.py
++++ b/Lib/Forthon_options.py
+@@ -92,7 +92,7 @@ class InputError(Exception):
+ # --- Otherwise ignore the arguments. This is needed since for example this
+ # --- module may be imported by the compilers module which is used by some
+ # --- program other than Forthon.
+-if os.path.basename(sys.argv[0]) == 'Forthon' or sys.argv[0] == '-c':
++if os.path.basename(sys.argv[0]).startswith('Forthon') or sys.argv[0] == '-c':
+ (options, args) = parser.parse_args()
+ else:
+ (options, args) = parser.parse_args(args=[])