Skip to content

Commit

Permalink
Added a __version__ variable, upgraded goopylib to beta
Browse files Browse the repository at this point in the history
Signed-off-by: Bhavye Mathur <bhavyemathur@gmail.com>
  • Loading branch information
BhavyeMathur committed Jan 13, 2024
1 parent 5d0e177 commit 662cd33
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions goopylib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import os
os.add_dll_directory(f"{sys.prefix}/goopylib")


__version__ = "2.0.0.beta0"

# pylint: disable=wrong-import-position

from .core import *
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "goopylib"
description = "A powerful game, graphics, and application development library for Python"
version = "2.0.0.alpha4"
version = "2.0.0.beta0"
readme = "README.md"

requires-python = ">=3.8"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = goopylib
version = 2.0.0.alpha4
version = 2.0.0.beta0
author = Bhavye Mathur
author_email = bhavyemathur@gmail.com

Expand Down
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import setup, Extension
import setuptools

FULLVERSION = "2.0.0.alpha4"
FULLVERSION = "2.0.0.beta0"
PYTHON_REQUIRES = (3, 8)

RUNTIME_LIBRARY_DIRS = []
Expand Down Expand Up @@ -64,6 +64,17 @@ def check_version():
with open("setup.cfg", "w") as f:
f.write(content)

# Update the __init__.py file with these version details

with open("goopylib/__init__.py", "r") as f:
content = f.read()

content = re.sub("__version__ = \".*\"",
f"__version__ = \"{FULLVERSION}\"", content)

with open("goopylib/__init__.py", "w") as f:
f.write(content)


if sys.platform == "darwin":
compile_args = ["-std=c++17", "-Wno-macro-redefined", "-Wno-unused-function", "-Wno-unknown-pragmas"]
Expand Down

0 comments on commit 662cd33

Please sign in to comment.