Skip to content

Commit

Permalink
Updated setup.py
Browse files Browse the repository at this point in the history
- Also updated READMEs
  • Loading branch information
not-na committed Jan 16, 2021
1 parent 5f36c7a commit 849c784
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ This package can also be installed via pip or easy_install::

$ easy_install peng3d

More features coming soon!
See the docs linked under the badge above for more information!
7 changes: 4 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
.. image:: https://circleci.com/gh/not-na/peng3d.svg?style=svg
:target: https://circleci.com/gh/not-na/peng3d

peng3d is an opensource 3d graphics engine written in python and with pyglet.
peng3d is an open-source 3D graphics engine written in python and with pyglet.

peng3d aims to make creating quick-and-easy visualizations and proof-of-concept projects easier.
peng3d aims to make creating quick-and-easy visualizations and proof-of-concept projects easier
while still being powerful enough for larger projects as well.

peng3d is a set of tools and classes extending built-in pyglet and python functionality with easier to use variants that are still compatible with low-level programming and old code.

Expand All @@ -33,4 +34,4 @@ This package can also be installed via pip or easy_install::

$ easy_install peng3d

More features coming soon!
See the docs linked under the badge above for more information!
48 changes: 22 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# setup.py
#
# Copyright 2016 notna <notna@apparat.org>
# Copyright 2016-2021 notna <notna@apparat.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -22,42 +22,37 @@
#
#

# Distribution command:
# sudo python setup.py install sdist bdist register upload
# Distribution commands:
# python setup.py sdist bdist bdist_egg bdist_wheel
# outside venv:
# twine upload dist/*

# Test command:
# tox -- --x-display=$DISPLAY -v -m "'not graphical'"

#import peng3d.version as ver

import imp
import os
import sys
import importlib

def load_module(name):
names = name.split(".")
path = None
for name in names:
f, path, info = imp.find_module(name, path)
path = [path]
return imp.load_module(name, f, path[0], info)

ver = load_module("peng3d.version")
spec = importlib.util.spec_from_file_location("peng3d.version",
os.path.join("peng3d", "version.py")
)
module = importlib.util.module_from_spec(spec)
sys.modules["peng3d.version"] = module
spec.loader.exec_module(module)

ver = module

try:
from setuptools import setup
except ImportError:
from distutils.core import setup

# Fix for very old python versions from https://docs.python.org/2/distutils/setupscript.html#additional-meta-data
# patch distutils if it can't cope with the "classifiers" or
# "download_url" keywords
from sys import version
if version < '2.2.3':
from distutils.dist import DistributionMetadata
DistributionMetadata.classifiers = None
DistributionMetadata.download_url = None

try:
longdesc = open("README.txt","r").read()
longdesc = open("README.txt", "r").read()
except Exception:
longdesc = "Python and pyglet based 3D Engine and toolkit"

Expand All @@ -70,8 +65,8 @@ def load_module(name):
url="https://github.com/not-na/peng3d",
packages=['peng3d',"peng3d.actor","peng3d.gui","peng3d.util"],
install_requires=[
"pyglet>=1.3.2",
"bidict>=0.14.2",
"pyglet>=1.5.3",
"bidict>=0.19.0",
],
provides=["peng3d"],
setup_requires=['pytest-runner'],
Expand All @@ -95,15 +90,16 @@ def load_module(name):

"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",

"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",

"Topic :: Games/Entertainment",
"Topic :: Multimedia :: Graphics :: 3D Rendering",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ commands=pip install -e .
norecursedirs=peng3d-py2.7
peng3d-py3.5
peng3d-py3.6
peng3d-py
.tox
markers=
graphical: Requires X-Server

0 comments on commit 849c784

Please sign in to comment.