public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-doc/geeknote/, app-doc/geeknote/files/
@ 2023-08-29  7:01 Vitaly Zdanevich
  0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Zdanevich @ 2023-08-29  7:01 UTC (permalink / raw
  To: gentoo-commits

commit:     1bbbf8a16dcd49836f45836c6ce071c55d31fcc2
Author:     Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
AuthorDate: Tue Aug 29 07:01:04 2023 +0000
Commit:     Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
CommitDate: Tue Aug 29 07:01:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1bbbf8a1

app-doc/geeknote: new package, add 9999

Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly <AT> ya.ru>

 app-doc/geeknote/files/completion.patch | 29 ++++++++++++++++++++++++++++
 app-doc/geeknote/geeknote-9999.ebuild   | 34 +++++++++++++++++++++++++++++++++
 app-doc/geeknote/metadata.xml           | 12 ++++++++++++
 3 files changed, 75 insertions(+)

diff --git a/app-doc/geeknote/files/completion.patch b/app-doc/geeknote/files/completion.patch
new file mode 100644
index 0000000000..fdc60cedf5
--- /dev/null
+++ b/app-doc/geeknote/files/completion.patch
@@ -0,0 +1,29 @@
+diff --git i/setup.py w/setup.py
+index 5cd1e35..a2618ab 100755
+--- i/setup.py
++++ w/setup.py
+@@ -24,22 +24,22 @@ class full_install(install):
+         ),
+         (
+             "zsh-completion-dir=",
+             None,
+             "(Linux only) Set zsh completion directory (default: /usr/local/share/zsh/site-functions)",
+         ),
+     ]
+ 
+     def initialize_options(self):
+         install.initialize_options(self)
+-        self.bash_completion_dir = "/etc/bash_completion.d"
+-        self.zsh_completion_dir = "/usr/local/share/zsh/site-functions"
++        self.bash_completion_dir = "${D}"
++        self.zsh_completion_dir = "${D}"
+ 
+     def run(self):
+         if sys.platform.startswith("linux"):
+             self.install_autocomplete()
+         install.run(self)
+ 
+     def install_autocomplete(self):
+         def copy_autocomplete(src, dst):
+             try:
+                 if os.path.exists(dst):

diff --git a/app-doc/geeknote/geeknote-9999.ebuild b/app-doc/geeknote/geeknote-9999.ebuild
new file mode 100644
index 0000000000..fd032c8c11
--- /dev/null
+++ b/app-doc/geeknote/geeknote-9999.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 git-r3
+
+DESCRIPTION="Evernote CLI"
+HOMEPAGE="https://github.com/Evernote/evernote-sdk-python3"
+EGIT_REPO_URI="https://github.com/jeffkowalski/geeknote"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+RDEPEND="dev-python/evernote3[${PYTHON_USEDEP}]
+dev-python/html2text[${PYTHON_USEDEP}]
+dev-python/sqlalchemy[${PYTHON_USEDEP}]
+dev-python/markdown2[${PYTHON_USEDEP}]
+dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+dev-python/thrift[${PYTHON_USEDEP}]
+dev-python/lxml[${PYTHON_USEDEP}]"
+
+src_prepare() {
+	eapply "${FILESDIR}"/completion.patch
+
+	default
+}
+
+python_install_all() {
+	distutils-r1_python_install_all --bash-completion-dir="${D}"/etc/bash_completion.d
+}

diff --git a/app-doc/geeknote/metadata.xml b/app-doc/geeknote/metadata.xml
new file mode 100644
index 0000000000..7a077c1735
--- /dev/null
+++ b/app-doc/geeknote/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<name>Vitaly Zdanevich</name>
+		<email>zdanevich.vitaly@ya.ru</email>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">jeffkowalski/geeknote</remote-id>
+		<bugs-to>https://github.com/jeffkowalski/geeknote/issues</bugs-to>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: app-doc/geeknote/, app-doc/geeknote/files/
@ 2023-08-29 18:04 Vitaly Zdanevich
  0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Zdanevich @ 2023-08-29 18:04 UTC (permalink / raw
  To: gentoo-commits

commit:     187166c639d3950dc76917c8e351ea22f982e9ab
Author:     Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
AuthorDate: Tue Aug 29 18:04:10 2023 +0000
Commit:     Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
CommitDate: Tue Aug 29 18:04:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=187166c6

app-doc/geeknote: fix installation of autocompletiion

Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly <AT> ya.ru>

 app-doc/geeknote/files/completion.patch            | 29 ----------------------
 ...eeknote-9999-remove_completion_from_setup.patch | 21 ++++++++++++++++
 app-doc/geeknote/geeknote-9999.ebuild              | 13 +++++-----
 3 files changed, 27 insertions(+), 36 deletions(-)

diff --git a/app-doc/geeknote/files/completion.patch b/app-doc/geeknote/files/completion.patch
deleted file mode 100644
index fdc60cedf5..0000000000
--- a/app-doc/geeknote/files/completion.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git i/setup.py w/setup.py
-index 5cd1e35..a2618ab 100755
---- i/setup.py
-+++ w/setup.py
-@@ -24,22 +24,22 @@ class full_install(install):
-         ),
-         (
-             "zsh-completion-dir=",
-             None,
-             "(Linux only) Set zsh completion directory (default: /usr/local/share/zsh/site-functions)",
-         ),
-     ]
- 
-     def initialize_options(self):
-         install.initialize_options(self)
--        self.bash_completion_dir = "/etc/bash_completion.d"
--        self.zsh_completion_dir = "/usr/local/share/zsh/site-functions"
-+        self.bash_completion_dir = "${D}"
-+        self.zsh_completion_dir = "${D}"
- 
-     def run(self):
-         if sys.platform.startswith("linux"):
-             self.install_autocomplete()
-         install.run(self)
- 
-     def install_autocomplete(self):
-         def copy_autocomplete(src, dst):
-             try:
-                 if os.path.exists(dst):

diff --git a/app-doc/geeknote/files/geeknote-9999-remove_completion_from_setup.patch b/app-doc/geeknote/files/geeknote-9999-remove_completion_from_setup.patch
new file mode 100644
index 0000000000..c31c3c6c7d
--- /dev/null
+++ b/app-doc/geeknote/files/geeknote-9999-remove_completion_from_setup.patch
@@ -0,0 +1,21 @@
+--- a/setup.py
++++ b/setup.py
+@@ -52,12 +52,12 @@ class full_install(install):
+                 print(traceback.format_exc())
+
+         print("installing autocomplete")
+-        copy_autocomplete(
+-            "completion/bash_completion/_geeknote", self.bash_completion_dir
+-        )
+-        copy_autocomplete(
+-            "completion/zsh_completion/_geeknote", self.zsh_completion_dir
+-        )
++#        copy_autocomplete(
++#            "completion/bash_completion/_geeknote", self.bash_completion_dir
++#        )
++#        copy_autocomplete(
++#            "completion/zsh_completion/_geeknote", self.zsh_completion_dir
++#        )
+
+
+ with open("geeknote/__init__.py") as f:

diff --git a/app-doc/geeknote/geeknote-9999.ebuild b/app-doc/geeknote/geeknote-9999.ebuild
index fd032c8c11..9af468065f 100644
--- a/app-doc/geeknote/geeknote-9999.ebuild
+++ b/app-doc/geeknote/geeknote-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 PYTHON_COMPAT=( python3_{10..11} )
 DISTUTILS_USE_PEP517=setuptools
 
-inherit distutils-r1 git-r3
+inherit bash-completion-r1 distutils-r1 git-r3
 
 DESCRIPTION="Evernote CLI"
 HOMEPAGE="https://github.com/Evernote/evernote-sdk-python3"
@@ -23,12 +23,11 @@ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
 dev-python/thrift[${PYTHON_USEDEP}]
 dev-python/lxml[${PYTHON_USEDEP}]"
 
-src_prepare() {
-	eapply "${FILESDIR}"/completion.patch
-
-	default
-}
+PATCHES=( "${FILESDIR}/${P}-remove_completion_from_setup.patch" )
 
 python_install_all() {
-	distutils-r1_python_install_all --bash-completion-dir="${D}"/etc/bash_completion.d
+        dobashcomp completion/bash_completion/_geeknote
+        insinto /usr/share/zsh/site-functions
+        doins completion/zsh_completion/_geeknote
+        distutils-r1_python_install_all
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-29 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29 18:04 [gentoo-commits] repo/proj/guru:dev commit in: app-doc/geeknote/, app-doc/geeknote/files/ Vitaly Zdanevich
  -- strict thread matches above, loose matches on Subject: below --
2023-08-29  7:01 Vitaly Zdanevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox