* [bug#44512] [PATCH] gnu: Add python-telethon.
@ 2020-11-08 9:13 Adam Kandur via Guix-patches via
2020-11-18 20:48 ` bug#44512: " Efraim Flashner
0 siblings, 1 reply; 2+ messages in thread
From: Adam Kandur via Guix-patches via @ 2020-11-08 9:13 UTC (permalink / raw)
To: 44512
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: 0001-gnu-Add-python-telethon.patch --]
[-- Type: text/x-patch, Size: 1899 bytes --]
From 40a037719317f943e4d311e6c03b1398feaffe7b Mon Sep 17 00:00:00 2001
From: Adam <rndd@tuta.io>
Date: Sun, 8 Nov 2020 12:10:32 +0300
Subject: [PATCH] gnu: Add python-telethon.
* gnu/packages/python-xyz.scm (python-telethon): New variable.
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5bbd547..d7dfaf2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22560,6 +22560,29 @@ a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
equivalent schemata in the XML-based default RELAX NG syntax.")
(license license:expat)))
+(define-public python-telethon
+ (package
+ (name "python-telethon")
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-rsa" ,python-rsa)
+ ("python-pyaes" ,python-pyaes)
+ ("python-pytest" ,python-pytest)))
+ (version "v1.17.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LonamiWebs/Telethon")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
+ (home-page "https://docs.telethon.dev")
+ (synopsis "Telethon is an asyncio Python 3 MTProto library to interact with Telegram's API as a user or through a bot account (bot API alternative).")
+ (description "Telegram is a popular messaging application. This library is meant to make it easy for you to write Python programs that can interact with Telegram. Think of it as a wrapper that has already done the heavy job for you, so you can focus on developing an application.")
+ (license license:expat)))
+
(define-public python-citeproc-py
(package
(name "python-citeproc-py")
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#44512: [PATCH] gnu: Add python-telethon.
2020-11-08 9:13 [bug#44512] [PATCH] gnu: Add python-telethon Adam Kandur via Guix-patches via
@ 2020-11-18 20:48 ` Efraim Flashner
0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2020-11-18 20:48 UTC (permalink / raw)
To: Adam Kandur; +Cc: 44512-done
[-- Attachment #1: Type: text/plain, Size: 3115 bytes --]
I made a couple of changes before pushing the patch
On Sun, Nov 08, 2020 at 10:13:16AM +0100, Adam Kandur via Guix-patches via wrote:
>
>
> From 40a037719317f943e4d311e6c03b1398feaffe7b Mon Sep 17 00:00:00 2001
> From: Adam <rndd@tuta.io>
> Date: Sun, 8 Nov 2020 12:10:32 +0300
> Subject: [PATCH] gnu: Add python-telethon.
>
> * gnu/packages/python-xyz.scm (python-telethon): New variable.
> ---
> gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 5bbd547..d7dfaf2 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -22560,6 +22560,29 @@ a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
> equivalent schemata in the XML-based default RELAX NG syntax.")
> (license license:expat)))
>
> +(define-public python-telethon
> + (package
> + (name "python-telethon")
We normally put this after the source, so I moved it there.
> + (build-system python-build-system)
> + (propagated-inputs
> + `(("python-rsa" ,python-rsa)
> + ("python-pyaes" ,python-pyaes)
> + ("python-pytest" ,python-pytest)))
pytest should be a native-input. I also added python-pytest-asyncio and
python-pytest-trio to native-inputs.
> + (version "v1.17.5")
the 'v' isn't part of the version string. Instead the 'commit' as part
of the source becomes '(commit (string-apend "v" version))'
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/LonamiWebs/Telethon")
> + (commit version)))
I see you noticed the pypi release didn't come with tests :)
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
I replaced the 'check phase with a phase which runs
(invoke "py.test" "-v")
> + (home-page "https://docs.telethon.dev")
> + (synopsis "Telethon is an asyncio Python 3 MTProto library to interact with Telegram's API as a user or through a bot account (bot API alternative).")
> + (description "Telegram is a popular messaging application. This library is meant to make it easy for you to write Python programs that can interact with Telegram. Think of it as a wrapper that has already done the heavy job for you, so you can focus on developing an application.")
> + (license license:expat)))
I wasn't a fan of the synopsis or description, so I took the synopsis
which came from 'guix import pypi pypi telethon' and I shortened the
description to mostly just include that it interacts with Telegram.
> +
> (define-public python-citeproc-py
> (package
> (name "python-citeproc-py")
> --
> 2.28.0
>
Thanks for the patch! Pushed.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-18 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-08 9:13 [bug#44512] [PATCH] gnu: Add python-telethon Adam Kandur via Guix-patches via
2020-11-18 20:48 ` bug#44512: " Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).