mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 12:56:30 +01:00
Support install from pypi (rc1)
This commit is contained in:
parent
6c52fd0da9
commit
8787f8c34f
11 changed files with 289 additions and 434 deletions
100
setup.py
100
setup.py
|
|
@ -1,33 +1,23 @@
|
|||
"""
|
||||
Do custom actions during build/install step.
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools import setup
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
|
||||
VERSION_PATH = os.path.join("evennia", "VERSION.txt")
|
||||
OS_WINDOWS = os.name == "nt"
|
||||
|
||||
|
||||
def get_requirements():
|
||||
def get_evennia_executable():
|
||||
"""
|
||||
To update the requirements for Evennia, edit the requirements.txt file.
|
||||
"""
|
||||
with open("requirements.txt", "r") as f:
|
||||
req_lines = f.readlines()
|
||||
reqs = []
|
||||
for line in req_lines:
|
||||
# Avoid adding comments.
|
||||
line = line.split("#")[0].strip()
|
||||
if line:
|
||||
reqs.append(line)
|
||||
return reqs
|
||||
Called from build process.
|
||||
|
||||
|
||||
def get_scripts():
|
||||
"""
|
||||
Determine which executable scripts should be added. For Windows,
|
||||
this means creating a .bat file.
|
||||
|
||||
"""
|
||||
if OS_WINDOWS:
|
||||
batpath = os.path.join("bin", "windows", "evennia.bat")
|
||||
|
|
@ -39,17 +29,9 @@ def get_scripts():
|
|||
return [os.path.join("bin", "unix", "evennia")]
|
||||
|
||||
|
||||
def get_version():
|
||||
def get_all_files():
|
||||
"""
|
||||
When updating the Evennia package for release, remember to increment the
|
||||
version number in evennia/VERSION.txt
|
||||
"""
|
||||
return open(VERSION_PATH).read().strip()
|
||||
|
||||
|
||||
def package_data():
|
||||
"""
|
||||
By default, the distribution tools ignore all non-python files.
|
||||
By default, the distribution tools ignore all non-python files, such as VERSION.txt.
|
||||
|
||||
Make sure we get everything.
|
||||
"""
|
||||
|
|
@ -64,61 +46,5 @@ def package_data():
|
|||
return file_set
|
||||
|
||||
|
||||
# setup the package
|
||||
setup(
|
||||
name="evennia",
|
||||
version=get_version(),
|
||||
author="The Evennia community",
|
||||
maintainer="Griatch",
|
||||
url="http://www.evennia.com",
|
||||
description="A full-featured toolkit and server for text-based multiplayer games (MUDs, MU*).",
|
||||
license="BSD",
|
||||
long_description="""
|
||||
_Evennia_ is an open-source library and toolkit for building multi-player
|
||||
online text games (MUD, MUX, MUSH, MUCK and other MU*). You easily design
|
||||
your entire game using normal Python modules, letting Evennia handle the
|
||||
boring stuff all multiplayer games need. Apart from supporting traditional
|
||||
MUD clients, Evennia comes with both a HTML5 game web-client and a
|
||||
web-server out of the box.
|
||||
""",
|
||||
long_description_content_type="text/markdown",
|
||||
packages=find_packages(),
|
||||
scripts=get_scripts(),
|
||||
install_requires=get_requirements(),
|
||||
package_data={"": package_data()},
|
||||
zip_safe=False,
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: JavaScript",
|
||||
"Development Status :: 4 - Beta",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Environment :: Console",
|
||||
"Environment :: Web Environment",
|
||||
"Framework :: Django",
|
||||
"Framework :: Django :: 2.2",
|
||||
"Framework :: Twisted",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: Education",
|
||||
"Operating System :: MacOS",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Topic :: Database",
|
||||
"Topic :: Education",
|
||||
"Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)",
|
||||
"Topic :: Games/Entertainment :: Puzzle Games",
|
||||
"Topic :: Games/Entertainment :: Role-Playing",
|
||||
"Topic :: Games/Entertainment :: Simulation",
|
||||
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
||||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
|
||||
],
|
||||
python_requires=">=3.7",
|
||||
project_urls={
|
||||
"Source": "https://github.com/evennia/evennia",
|
||||
"Issue tracker": "https://github.com/evennia/evennia/issues",
|
||||
"Chat": "http://www.evennia.com/chat-redirect-3",
|
||||
"Forum": "https://groups.google.com/forum/#%21forum/evennia",
|
||||
"Dev Blog": "https://evennia.blogspot.com/",
|
||||
"Patreon": "https://www.patreon.com/griatch",
|
||||
},
|
||||
)
|
||||
# legacy entrypoint
|
||||
setup(scripts=get_evennia_executable(), package_data={"": get_all_files()})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue