Skip to content

Commit 6fe9856

Browse files
committed
dev-python/objgraph: new package, add 3.5.0-r1
Closes: https://git.edevau.net/onkelbeh/HomeAssistantRepository/issues/3080 Signed-off-by: Andreas Billmeier <[email protected]>
1 parent 9676566 commit 6fe9856

File tree

5 files changed

+128
-5
lines changed

5 files changed

+128
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,12 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
617617

618618
## Licenses
619619
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
620-
There are 1921 Ebuilds in total, 1910 of them have in total 1929 (42 different) licenses assigned.
620+
There are 1925 Ebuilds in total, 1914 of them have in total 1933 (42 different) licenses assigned.
621621

622622
|License| Ebuilds using it|
623623
|-------|-----|
624-
|MIT|1083|
625-
|Apache-2.0|442|
624+
|MIT|1084|
625+
|Apache-2.0|445|
626626
|GPL-3|128|
627627
|BSD|106|
628628
|LGPL-3|25|
@@ -664,9 +664,9 @@ There are 1921 Ebuilds in total, 1910 of them have in total 1929 (42 different)
664664
|GPL-2+|1|
665665
|GPL-2-with-linking-exception|1|
666666

667-
(Last counted: 14/03/2024)
667+
(Last counted: 15/03/2024)
668668

669669
I did my best to keep these clean. If a valid license was published on PyPI, it has been automatically merged. Otherwise I took it from GitHub or alternatively from comments/files in the source. Sometimes these differed and have been not unique. All license strings are adjusted to the list in `/usr/portage/gentoo/licenses/`. Some packages do not have any license published. In this case, Authors have been asked for clarification, some did not respond. Following the [official Gentoo Guide](https://devmanual.gentoo.org/general-concepts/licenses/index.html), these then were added with an `all-rights-reserved` license and `RESTRICT="mirror"` was set. Find the appropriate licenses referenced in the Ebuild files and in the corresponding homepages or sources.
670670

671671
A big thanks goes to Iris for reviewing this README.
672-
Last updated: 14/03/2024
672+
Last updated: 15/03/2024

dev-python/objgraph/Manifest

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
AUX objgraph-3.4.1-tests.patch 2708 BLAKE2B 2b2c78340c1be1c60fe3b43a671b1fab07bcb58275d90f59fca9dcc8bebdd52f5d6ed69455f9135647b27ed64d3251cb7d7b5f3da4e7b394bf45a45791b73c73 SHA512 8d8a43bcb75141a5fa278871d7e4e3b2ba1dcb833967a347f334675d6fa1a510d7f9abbcae82419617fc593ca02e1708ff69d9b4babe1d23e08d24814f9b564b
2+
DIST objgraph-3.5.0.tar.gz 638591 BLAKE2B 7a0ee6c9ee1d8417f7b322f19a397ea2452ed592ebbc07afc1378e86b5bad3895ed2e4a20d92a5f4b0215f68fc7440f85852303585a3161497a85d41d4c4e550 SHA512 da29202871bad06f2caa9cc297e7bf9a15af4c89e23baf9c271764e0ce93ff9557cd5c21d0bf39b425713460dbe2dbc8468d70c6bfcc1c3ff8b1b4d4a7923858
3+
EBUILD objgraph-3.5.0-r1.ebuild 812 BLAKE2B ec9594e67184a0976a4aa72f73d6cd88ab9a613564f4967e8793c0e0956747d3b469c608d2020f48bd072c6f97180679871daff476d212e708ef05b9021a6bb0 SHA512 84692ef9f536153895ed5a8264fa1b0a1d1cb220829669e21e4899dca8068821d2d36c56b6baca8b8acdf679d4f93b7db9b5096f08f23b1c99e50d3b958d921b
4+
MISC metadata.xml 510 BLAKE2B 505acd555c4b125ca548fdfd279027843cf725a5f0379ae6398c7766eb15ab9f062eedf89bff7a63d364fa28461892875b1705b372ea55eeb7ec14e822aab4c9 SHA512 5584de5095cf02fbc2de534e61e91eb6c0502dde7efa583f021a27550c17d7c37e2c96b7f2647f6f57689046524c0245a9375121eb138c9fa04b12fe9223b6eb
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
diff --git a/tests.py b/tests.py
2+
index fc2ee7f..d494470 100755
3+
--- a/tests.py
4+
+++ b/tests.py
5+
@@ -11,6 +11,7 @@ import tempfile
6+
import textwrap
7+
import types
8+
import unittest
9+
+import platform
10+
11+
# setuptools imports `imp`, which triggers a DeprecationWarning starting with
12+
# Python 3.4 in the middle of my pristine test suite. But if I do the import
13+
@@ -363,7 +364,7 @@ def doctest_get_new_ids_prints():
14+
========================================================
15+
Type Old_ids Current_ids New_ids Count_Deltas
16+
========================================================
17+
- list ... ... ... +2
18+
+ wt ... ... ... +2
19+
========================================================
20+
21+
"""
22+
@@ -387,7 +388,10 @@ class ByTypeTest(GarbageCollectedMixin, unittest.TestCase):
23+
# 2. the `res` list
24+
# referrers we don't want:
25+
# the ``objects`` list in the now-dead stack frame of objgraph.by_type
26+
- self.assertLessEqual(len(gc.get_referrers(res[0])), 2)
27+
+ if 'pypy' in platform.python_implementation().lower():
28+
+ self.assertLessEqual(len(gc.get_referrers(res[0])), 3)
29+
+ else:
30+
+ self.assertLessEqual(len(gc.get_referrers(res[0])), 2)
31+
32+
33+
class AtAddrsTest(unittest.TestCase):
34+
@@ -439,7 +443,10 @@ class StringRepresentationTest(GarbageCollectedMixin,
35+
obj = MyClass()
36+
with mock.patch.object(obj, 'my_method',
37+
types.MethodType(mock_method, obj)):
38+
- self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
39+
+ if 'pypy' in platform.python_implementation().lower():
40+
+ self.assertRegex(objgraph._short_repr(obj.my_method), '<bound method')
41+
+ else:
42+
+ self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
43+
44+
def test_short_repr_mocked_name(self):
45+
self.assertRegex(objgraph._short_repr(mock.Mock(__name__=mock.Mock())),
46+
@@ -462,7 +469,10 @@ class StringRepresentationTest(GarbageCollectedMixin,
47+
obj = MyClass()
48+
with mock.patch.object(obj, 'my_method',
49+
types.MethodType(mock_method, obj)):
50+
- self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
51+
+ if 'pypy' in platform.python_implementation().lower():
52+
+ self.assertRegex(objgraph._short_repr(obj.my_method), '<bound method')
53+
+ else:
54+
+ self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
55+
56+
@skipIf(sys.version_info[0] > 2, "Python 3 has no unbound methods")
57+
def test_short_repr_unbound_method(self):

dev-python/objgraph/metadata.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<maintainer type="project">
5+
<email>[email protected]</email>
6+
<name>Andreas Billmeier</name>
7+
</maintainer>
8+
<upstream>
9+
<remote-id type="pypi">objgraph</remote-id>
10+
<remote-id type="github">mgedmin/objgraph</remote-id>
11+
<maintainer status="unknown">
12+
<email>[email protected]</email>
13+
<name>Marius Gedminas</name>
14+
</maintainer>
15+
</upstream>
16+
</pkgmetadata>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
DISTUTILS_USE_PEP517=setuptools
7+
PYTHON_COMPAT=( python3_{11..12} )
8+
9+
inherit distutils-r1 pypi
10+
11+
DESCRIPTION="Draws Python object reference graphs with graphviz"
12+
HOMEPAGE="
13+
https://github.com/mgedmin/objgraph/
14+
https://pypi.org/project/objgraph/
15+
"
16+
17+
LICENSE="MIT"
18+
KEYWORDS="amd64 arm arm64 x86"
19+
SLOT="0"
20+
IUSE="doc"
21+
22+
RDEPEND="
23+
media-gfx/graphviz
24+
"
25+
BDEPEND="
26+
test? (
27+
media-gfx/xdot
28+
)
29+
"
30+
31+
PATCHES=(
32+
"${FILESDIR}/objgraph-3.4.1-tests.patch"
33+
)
34+
35+
distutils_enable_tests unittest
36+
37+
src_prepare() {
38+
# the dependency is optional, actually
39+
sed -i -e '/graphviz/d' setup.py || die
40+
distutils-r1_src_prepare
41+
}
42+
43+
python_install_all() {
44+
use doc && local HTML_DOCS=( docs/* )
45+
distutils-r1_python_install_all
46+
}

0 commit comments

Comments
 (0)