public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Kacper Kowalik" <xarthisius@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: dev-python/Forthon/, dev-python/Forthon/files/
Date: Thu, 21 Feb 2013 09:58:33 +0000 (UTC)	[thread overview]
Message-ID: <1361440713.3af4d0f40b554b2b1747945e20770946f622e520.xarthisius@gentoo> (raw)

commit:     3af4d0f40b554b2b1747945e20770946f622e520
Author:     Kacper Kowalik (Xarthisius) <xarthisius <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 21 09:58:33 2013 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Thu Feb 21 09:58:33 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=3af4d0f4

[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 <AT> gentoo.org> for his help on this

---
 dev-python/Forthon/Forthon-0.8.11.ebuild           |    7 ++++---
 .../files/Forthon-0.8.11-fix_options_parser.patch  |   17 +++++++++++++++++
 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 2383f9b..cd35606 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 0000000..6a5bfc1
--- /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=[])


             reply	other threads:[~2013-02-21  9:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21  9:58 Kacper Kowalik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-11-26 22:30 [gentoo-commits] proj/sci:master commit in: dev-python/Forthon/, dev-python/Forthon/files/ Sebastien Fabbro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361440713.3af4d0f40b554b2b1747945e20770946f622e520.xarthisius@gentoo \
    --to=xarthisius@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox