Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the setup #44

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hooman/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .hooman import Hooman
from .formula import *

version_info = (0, 8, 2)
__version__ = ".".join([str(v) for v in version_info])
__version__ = "0.8.2"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just bump to 0.8.3

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[metadata]
description-file = README.md
description_file = README.md
20 changes: 16 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
from os import path
import os
import sys
from hooman import __version__ # thanks gunicorn

here = path.abspath(path.dirname(__file__))


requires = [
'pygame',
'numpy'
Expand All @@ -24,12 +21,27 @@
os.system("twine upload dist/* --skip-existing")
sys.exit()

# Following the PyPa solution for Single-sourcing the package version:
# https://packaging.python.org/en/latest/guides/single-sourcing-package-version/
def read(rel_path: str) -> str:
with open(os.path.join(here, rel_path)) as fp:
return fp.read()

def get_version(rel_path: str) -> str:
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string.")


# Get the long description from the README file
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()

setup(
name="hooman", # Required
version=__version__, # Required
version=get_version(path.join("hooman", "__init__.py")), # Required
description="Pygame for humans", # Optional
long_description=long_description, # Optional
long_description_content_type="text/markdown", # Optional (see note above)
Expand Down