From 3c8aa784bcecebc69387894e56b9108d71f6a45d Mon Sep 17 00:00:00 2001 From: neumond Date: Fri, 17 Jul 2020 23:34:13 +0300 Subject: [PATCH] Update readme & setup.py: make project installable from pypi again --- README.md | 2 +- setup.py | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6f4b306..0d552d6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Never use code in this repo if you don't trust your players! 1. Download and install wheel from github releases ```sh - pip install computercraft-*.whl + pip install computercraft ``` 2. Enable localhost in mod server config diff --git a/setup.py b/setup.py index 1c8abb8..bef6b9e 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,8 @@ +from pathlib import Path from setuptools import setup -from sys import argv -def is_register_command(a): - for item in a: - if item.startswith('-'): - continue - return item in ('register', 'bdist_wheel') - return False - - -longdesc = None -if is_register_command(argv[1:]): - import os - with os.popen('pandoc -f markdown_github -t rst README.md') as f: - longdesc = f.read() +longdesc = (Path(__file__).parent / 'README.md').read_text() setup( @@ -22,6 +10,7 @@ setup( version='0.3.0', description='Pythonization of ComputerCraft Minecraft mod. Write Python instead Lua!', long_description=longdesc, + long_description_content_type='text/markdown', url='https://github.com/neumond/python-computer-craft', author='Vitalik Verhovodov', author_email='knifeslaughter@gmail.com', @@ -30,7 +19,6 @@ setup( 'Development Status :: 3 - Alpha', 'Intended Audience :: Education', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Topic :: Games/Entertainment',