Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338553 - dev-python/ropemacs-0.6.ebuild (New package)
Summary: dev-python/ropemacs-0.6.ebuild (New package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: EBUILD, Inclusion
Depends on: 338556
Blocks: 338550
  Show dependency tree
 
Reported: 2010-09-24 13:33 UTC by Yang Zhang
Modified: 2010-10-04 02:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python/ropemacs main ebuild (ropemacs-0.6.ebuild,889 bytes, text/plain)
2010-09-24 13:33 UTC, Yang Zhang
Details
emacs site file (55ropemacs-gentoo.el,103 bytes, text/plain)
2010-09-24 13:34 UTC, Yang Zhang
Details
Patch the source for build errors (ropemacs-0.6-unexist-ropemode-directory.patch,545 bytes, patch)
2010-09-24 13:36 UTC, Yang Zhang
Details | Diff
New ebuild (ropemacs-0.6.ebuild,951 bytes, text/plain)
2010-09-29 09:28 UTC, Yang Zhang
Details
Name change (60ropemacs-gentoo.el,103 bytes, text/plain)
2010-09-29 09:29 UTC, Yang Zhang
Details
Ebuild without emacs site-init file (ropemacs-0.6.ebuild,871 bytes, text/plain)
2010-09-29 12:25 UTC, Yang Zhang
Details
Latest ebuild modified for EAPI3 (ropemacs-0.6.ebuild,894 bytes, text/plain)
2010-09-30 05:33 UTC, Yang Zhang
Details
Updated ebuild (20101002) (ropemacs-0.6.ebuild,997 bytes, text/plain)
2010-10-02 05:10 UTC, Yang Zhang
Details
Renamed patch (ropemacs-0.6-nonexistent-ropemode-directory.patch,545 bytes, patch)
2010-10-02 05:11 UTC, Yang Zhang
Details | Diff
Updated ebuild (20101003) (ropemacs-0.6.ebuild,997 bytes, text/plain)
2010-10-03 03:23 UTC, Yang Zhang
Details
Updated ebuild (20101003) (ropemacs-0.6.ebuild,1.01 KB, text/plain)
2010-10-03 04:23 UTC, Yang Zhang
Details
Updated ebuild (20101003) (ropemacs-0.6.ebuild,1.01 KB, text/plain)
2010-10-03 06:28 UTC, Yang Zhang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yang Zhang 2010-09-24 13:33:01 UTC
app-emacs/company-mode relays on dev-python/ropemacs to correctly complete python symbols but there are no ropemacs ebuild in portage yet.
Comment 1 Yang Zhang 2010-09-24 13:33:55 UTC
Created attachment 248511 [details]
dev-python/ropemacs main ebuild

The main ebuild
Comment 2 Yang Zhang 2010-09-24 13:34:56 UTC
Created attachment 248512 [details]
emacs site file

site-packages file for emacs
Comment 3 Yang Zhang 2010-09-24 13:36:58 UTC
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.
Comment 4 Ulrich Müller gentoo-dev 2010-09-29 06:52:14 UTC
(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.
Comment 5 Yang Zhang 2010-09-29 09:27:49 UTC
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.
Comment 6 Yang Zhang 2010-09-29 09:28:55 UTC
Created attachment 248954 [details]
New ebuild

Modified according to suggestions
Comment 7 Yang Zhang 2010-09-29 09:29:23 UTC
Created attachment 248955 [details]
Name change

Simply change the name
Comment 8 Ulrich Müller gentoo-dev 2010-09-29 10:41:03 UTC
(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.)
Comment 9 Yang Zhang 2010-09-29 12:23:59 UTC
(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.
Comment 10 Yang Zhang 2010-09-29 12:25:03 UTC
Created attachment 248957 [details]
Ebuild without emacs site-init file

Remove site-init file for emacs as well as app-emacs/pymacs dependency.
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-29 16:40:44 UTC
(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().
Comment 12 Yang Zhang 2010-09-30 05:29:53 UTC
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.
 
Comment 13 Yang Zhang 2010-09-30 05:33:03 UTC
Created attachment 249032 [details]
Latest ebuild modified for EAPI3

Modified according to suggestions in Commment #11
Comment 14 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-30 19:31:04 UTC
(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.
Comment 15 Yang Zhang 2010-10-02 05:10:31 UTC
Created attachment 249259 [details]
Updated ebuild (20101002)

Update for multiply Python ABIs as well as other suggestions in comment 14.
Comment 16 Yang Zhang 2010-10-02 05:11:12 UTC
Created attachment 249260 [details, diff]
Renamed patch

Just rename.
Comment 17 Yang Zhang 2010-10-02 05:12:33 UTC
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.
Comment 18 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-02 13:40:25 UTC
(In reply to comment #15)

- Please use HOMEPAGE="http://rope.sourceforge.net/ropemacs.html http://pypi.python.org/pypi/ropemacs" (in 1 line).
Comment 19 Yang Zhang 2010-10-03 03:23:12 UTC
(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.
Comment 20 Yang Zhang 2010-10-03 03:23:53 UTC
Created attachment 249393 [details]
Updated ebuild (20101003)

Fix HOMEPAGE
Comment 21 Yang Zhang 2010-10-03 04:23:25 UTC
Created attachment 249400 [details]
Updated ebuild (20101003)

Fix wrong ebuild upload
Comment 22 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-03 06:06:11 UTC
(In reply to comment #21)

- Please separate homepages in HOMEPAGE by one space, not tab.
Comment 23 Yang Zhang 2010-10-03 06:28:03 UTC
(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
Comment 24 Yang Zhang 2010-10-03 06:28:40 UTC
Created attachment 249401 [details]
Updated ebuild (20101003)

Fix HOMEPAGE seperation
Comment 25 Ulrich Müller gentoo-dev 2010-10-03 11:09:21 UTC
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?
Comment 26 Ulrich Müller gentoo-dev 2010-10-03 20:56:51 UTC
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.
Comment 27 Yang Zhang 2010-10-04 02:04:21 UTC
(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.