diff options
author | Dennis Lamm <expeditioneer@gentoo.org> | 2020-09-15 20:43:58 +0200 |
---|---|---|
committer | Dennis Lamm <expeditioneer@gentoo.org> | 2020-09-16 06:33:18 +0200 |
commit | f069a04345ecd3c1040c82711da214f9d239a146 (patch) | |
tree | 51a756bc7e1db89fef20d6fd74f1fa20ab0c0ead /dev-python/autoprop | |
parent | x11-plugins/pidgin-encryption: bump to EAPI 7 (diff) | |
download | gentoo-f069a04345ecd3c1040c82711da214f9d239a146.tar.gz gentoo-f069a04345ecd3c1040c82711da214f9d239a146.tar.bz2 gentoo-f069a04345ecd3c1040c82711da214f9d239a146.zip |
dev-python/autoprop: new package
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/17559
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Diffstat (limited to 'dev-python/autoprop')
-rw-r--r-- | dev-python/autoprop/Manifest | 1 | ||||
-rw-r--r-- | dev-python/autoprop/autoprop-1.0.2.ebuild | 18 | ||||
-rw-r--r-- | dev-python/autoprop/metadata.xml | 24 |
3 files changed, 43 insertions, 0 deletions
diff --git a/dev-python/autoprop/Manifest b/dev-python/autoprop/Manifest new file mode 100644 index 000000000000..6ca9ddbb7324 --- /dev/null +++ b/dev-python/autoprop/Manifest @@ -0,0 +1 @@ +DIST autoprop-1.0.2.tar.gz 11040 BLAKE2B b53bdbf79947002a0c319fa84c6033908948365d18a85dd2fd4139bff2125752e0bc3fc8f19e5d38c06cdc089f423cc8a720b8040593cfbda9c04c84b7cd4ffd SHA512 281c30fded6d79ed3bbb0de5b7a37c2cc5b985a4980974503b5bbb5940cd22f3c09c3b3d9d513d5cb95239519519b277bf43536407fedb593a43122ee32a8db6 diff --git a/dev-python/autoprop/autoprop-1.0.2.ebuild b/dev-python/autoprop/autoprop-1.0.2.ebuild new file mode 100644 index 000000000000..03d8f7babb8a --- /dev/null +++ b/dev-python/autoprop/autoprop-1.0.2.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 + +DESCRIPTION="Infer properties from accessor methods" +HOMEPAGE="https://github.com/kalekundert/autoprop https://pypi.org/project/autoprop/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +LICENSE="MIT" + +KEYWORDS="~amd64" +SLOT="0" + +distutils_enable_tests pytest diff --git a/dev-python/autoprop/metadata.xml b/dev-python/autoprop/metadata.xml new file mode 100644 index 000000000000..3b6fefbcfe32 --- /dev/null +++ b/dev-python/autoprop/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>3dprint@gentoo.org</email> + <name>Gentoo 3D Printer Project</name> + </maintainer> + <longdescription> + Properties are a feature in python that allow accessor functions (i.e. getters and setters) to masquerade as + regular attributes. This makes it possible to provide transparent APIs for classes that need to cache results, + lazily load data, maintain invariants, or react in any other way to attribute access. + + Unfortunately, making a property requires an annoying amount of boilerplate code. There are a few ways to + do it, but the most common and most succinct requires you to decorate two functions + (with two different decorators) and to type the name of the attribute three times. + + The autoprop module simplifies this process by searching your class for accessor methods and adding properties + corresponding to any such methods it finds. + </longdescription> + <upstream> + <remote-id type="github">kalekundert/autoprop</remote-id> + <remote-id type="pypi">autoprop</remote-id> + </upstream> +</pkgmetadata> |