app-emacs/company-mode relays on dev-python/ropemacs to correctly complete python symbols but there are no ropemacs ebuild in portage yet.
Created attachment 248511 [details] dev-python/ropemacs main ebuild The main ebuild
Created attachment 248512 [details] emacs site file site-packages file for emacs
Created attachment 248514 [details, diff] Patch the source for build errors The ropemacs-0.6 should be patched to build correctly. The situation is: ropemacs is not packaged with ropemode, but it species a 'ropemode' package in the setup. So we just remove the unexisted package.
(In reply to comment #2) > Created an attachment (id=248512) [details] Any particular reason why this is named 55* and not 60*? Numbers divisible by 10 are preferred. > ;;; dev-python/ropemacs site-lisp configuration > (require 'pymacs) > (pymacs-load "ropemacs" "rope-") Is there any possibility to autoload the package? "require" and "load" commands should be avoided in site-init files, see <https://overlays.gentoo.org/proj/emacs/wiki/sitefile%20problems>. (In reply to comment #1) > Created an attachment (id=248511) [details] > dev-python/ropemacs main ebuild > use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}" The ebuild should "die" if elisp-site-file-install fails.
Hi, thanks for the reply and suggestions. (In reply to comment #4) > (In reply to comment #2) > > Created an attachment (id=248512) [details] [details] > > Any particular reason why this is named 55* and not 60*? Numbers divisible by > 10 are preferred. > The 55* choice is simply to load repomacs after pymacs (50pymacs-gentoo.el). I changed it to 60* this time. > > ;;; dev-python/ropemacs site-lisp configuration > > > (require 'pymacs) > > (pymacs-load "ropemacs" "rope-") > > Is there any possibility to autoload the package? "require" and "load" commands > should be avoided in site-init files, see > <https://overlays.gentoo.org/proj/emacs/wiki/sitefile%20problems>. > > Thanks for the information. But I am afraid that the 'autoload' will work the same way as 'require'. Here since ropemacs is a python package, it should be imported to elisp namespace before use, the import will require us to load 'pymacs' first. Since app-emacs/company-mode will automatically load 'ropemacs', we can drop the emacs support here if necessary. I added the 'emacs' keyword just to make the functions in 'ropemacs' accessible directly to emacs. > (In reply to comment #1) > > Created an attachment (id=248511) [details] [details] > > dev-python/ropemacs main ebuild > > > use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}" > > The ebuild should "die" if elisp-site-file-install fails. > This has been changed in the new ebuild. Thanks.
Created attachment 248954 [details] New ebuild Modified according to suggestions
Created attachment 248955 [details] Name change Simply change the name
(In reply to comment #5) > Since app-emacs/company-mode will automatically load 'ropemacs', we can drop > the emacs support here if necessary. Yes, I think that dropping the site-init file and the emacs USE flag entirely is the way to go here. In similar cases, we often output a message in pkg_postinst, like this: pkg_postinst() { elog "In order to enable ropemacs support in Emacs, add the following" elog "line to your ~/.emacs file:" elog " (pymacs-load \"ropemacs\" \"rope-\")" } (The "(require 'pymacs)" shouldn't be necessary because pymacs-load is autoloaded in the pymacs site-init file.)
(In reply to comment #8) > (In reply to comment #5) > > Since app-emacs/company-mode will automatically load 'ropemacs', we can drop > > the emacs support here if necessary. > > Yes, I think that dropping the site-init file and the emacs USE flag entirely > is the way to go here. In similar cases, we often output a message in > pkg_postinst, like this: > > pkg_postinst() { > elog "In order to enable ropemacs support in Emacs, add the following" > elog "line to your ~/.emacs file:" > elog " (pymacs-load \"ropemacs\" \"rope-\")" > } > > (The "(require 'pymacs)" shouldn't be necessary because pymacs-load is > autoloaded in the pymacs site-init file.) > Thanks. The new ebuild removes the site-init file as well as the dependency on app-emacs/pymacs.
Created attachment 248957 [details] Ebuild without emacs site-init file Remove site-init file for emacs as well as app-emacs/pymacs dependency.
(In reply to comment #10) - Using of distutils.eclass in EAPI="2" in packages not supporting installation for multiple Python ABIs is deprecated. Please use EAPI="3". - Please verify if this package supports Python 3. - Please verify if this package is used as a library, which would mean that it could be installable for multiple Python ABIs. - Add app-arch/unzip to DEPEND. - Use src_prepare() instead of src_unpack(). - epatch() internally calls die() when patching fails, so delete explicit '|| die "epatch failed!"'. - Call distutils_pkg_postinst() in pkg_postinst().
Hi, thanks very much for these suggestions. (In reply to comment #11) > (In reply to comment #10) > > - Using of distutils.eclass in EAPI="2" in packages not supporting installation > for multiple Python ABIs is deprecated. Please use EAPI="3". Changed in the new ebuild. > - Please verify if this package supports Python 3. > - Please verify if this package is used as a library, which would mean that it > could be installable for multiple Python ABIs. The package is not listed in the python3 package index. Its dependency 'dev-python/rope' isn't in the index, either. 'Since dev-python/rope' does not support installation for multiple Python ABIs, I think we can only follow it currently. > - Add app-arch/unzip to DEPEND. > - Use src_prepare() instead of src_unpack(). > - epatch() internally calls die() when patching fails, so delete explicit > '|| die "epatch failed!"'. > - Call distutils_pkg_postinst() in pkg_postinst(). > Changed in the new ebuild. The new ebuild fetches the .gz sources instead of zip, so the app-arch/unzip is no longer needed.
Created attachment 249032 [details] Latest ebuild modified for EAPI3 Modified according to suggestions in Commment #11
(In reply to comment #13) - dev-python/rope does support installation for multiple Python ABIs (2.5, 2.6 and 2.7). dev-python/ropemacs should depend on Python 2.* and should use Python 2.* at build time and run time when Python 3.* is set as main active version of Python. - Inherit eclasses in alphabetic order when it is possible (like in this case). - Add http://pypi.python.org/pypi/ropemacs to HOMEPAGE. - Don't break lines after only 62 characters. Unbroken SRC_URI line would have only 78 characters. - Call distutils_src_prepare() in src_prepare(). - s/non-existed/nonexistent/ - Send this patch to upstream.
Created attachment 249259 [details] Updated ebuild (20101002) Update for multiply Python ABIs as well as other suggestions in comment 14.
Created attachment 249260 [details, diff] Renamed patch Just rename.
Thanks for all these suggestions. (In reply to comment #14) > (In reply to comment #13) > > - dev-python/rope does support installation for multiple Python ABIs (2.5, 2.6 > and 2.7). dev-python/ropemacs should depend on Python 2.* and should use > Python 2.* at build time and run time when Python 3.* is set as main active > version of Python. > - Inherit eclasses in alphabetic order when it is possible (like in this case). > - Add http://pypi.python.org/pypi/ropemacs to HOMEPAGE. > - Don't break lines after only 62 characters. Unbroken SRC_URI line would have > only 78 characters. > - Call distutils_src_prepare() in src_prepare(). > - s/non-existed/nonexistent/ Fixed in the new ebuild. The ebuild is now compatible with dev-python/rope for multiple Python ABIs. > - Send this patch to upstream. > This has been fixed by upstream in trunk. But no release has been made yet.
(In reply to comment #15) - Please use HOMEPAGE="http://rope.sourceforge.net/ropemacs.html http://pypi.python.org/pypi/ropemacs" (in 1 line).
(In reply to comment #18) > (In reply to comment #15) > > - Please use HOMEPAGE="http://rope.sourceforge.net/ropemacs.html > http://pypi.python.org/pypi/ropemacs" (in 1 line). > Thanks, updated in the new ebuild.
Created attachment 249393 [details] Updated ebuild (20101003) Fix HOMEPAGE
Created attachment 249400 [details] Updated ebuild (20101003) Fix wrong ebuild upload
(In reply to comment #21) - Please separate homepages in HOMEPAGE by one space, not tab.
(In reply to comment #22) > (In reply to comment #21) > > - Please separate homepages in HOMEPAGE by one space, not tab. > Sorry. Fixed in the new ebuild
Created attachment 249401 [details] Updated ebuild (20101003) Fix HOMEPAGE seperation
We have to stop the beautifying of whitespace at some point. ;-) The ebuild is good to go, in my opinion. @Arfrever: I suggest that dev-python/ropemacs should belong to both python and emacs herds, and the depending dev-python/ropemode to the python herd only. Is this o.k. with you?
Committed to portage tree, with two changes: - Renamed the patch file to a shorter name. - Deleted the "dodir docs" in src_install (which created a spurious ${D}/docs). Thank you for this contribution.
(In reply to comment #26) > Committed to portage tree, with two changes: > - Renamed the patch file to a shorter name. > - Deleted the "dodir docs" in src_install (which created a spurious ${D}/docs). > > Thank you for this contribution. > Glad I can help.