forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-engines/scrap-engine: New package at version 1.2.0
Signed-off-by: James Le Cuirot <[email protected]>
- Loading branch information
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST scrap-engine-1.2.0.gh.tar.gz 381529 BLAKE2B a482bc45900a4294be69e22308114fcdaa4a8bcaa22bce96e3436080ca7dbd2a546253ed8d1faefe2fa5c2ec57a2c6b2a63cbd7b42de39d9990968f9b34614d7 SHA512 5d1ec65eed4515e07f3c3a32f0423bcf41d7ba594508391024d22623f27d052464b5a3dc887b0ff6bea6c8f7d7fe54c30373460449b9977f0f95a9e2b1f978da |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff -Naur a/tests/scrap_bench.py b/tests/scrap_bench.py | ||
--- a/tests/scrap_bench.py 2022-01-05 17:13:26.000000000 +0000 | ||
+++ b/tests/scrap_bench.py 2022-06-24 14:33:10.215047579 +0100 | ||
@@ -22,7 +22,7 @@ | ||
time2 = 0 | ||
|
||
b_map.show() | ||
- while True: | ||
+ for _ in range(100): | ||
time0 = time.time() | ||
times += time2 | ||
for ob in rectangle.obs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Games Project</name> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">lxgr-linux/scrap_engine</remote-id> | ||
<remote-id type="pypi">scrap-engine</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{9..11} ) | ||
DISTUTILS_USE_PEP517=setuptools | ||
|
||
inherit distutils-r1 | ||
|
||
MY_PN="${PN//-/_}" | ||
MY_P="${MY_PN}-${PV}" | ||
|
||
DESCRIPTION="Terminal-based Python game engine involving objects on a map" | ||
HOMEPAGE="https://github.com/lxgr-linux/scrap_engine" | ||
SRC_URI="https://github.com/lxgr-linux/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz" | ||
LICENSE="GPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
|
||
S="${WORKDIR}/${MY_P}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-tests.patch | ||
) | ||
|
||
DOCS=( | ||
README.md | ||
docs/DOCS.md | ||
pics/example1.jpg | ||
) | ||
|
||
src_prepare() { | ||
default | ||
|
||
# PEP 517 needs this metadata. | ||
echo "Version: ${PV}" > "${S}"/PKG-INFO || die | ||
|
||
# Adjust doc resource paths. | ||
sed -i "s:\.\./pics/::g" docs/DOCS.md || die | ||
} | ||
|
||
python_test() { | ||
for TEST in "${S}"/tests/*.py; do | ||
"${EPYTHON}" "${TEST}" || die | ||
done | ||
} |