Skip to content

Commit

Permalink
Merge pull request #34 from ZeroIntensity/3.0.1
Browse files Browse the repository at this point in the history
fix #33
  • Loading branch information
ZeroIntensity authored Apr 1, 2024
2 parents fcaa2c4 + eb37275 commit 517025a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
13 changes: 13 additions & 0 deletions a.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from pointers import Reference, MutReference, ref

my_value = ref(0)

def test(my_ref: MutReference[int]) -> None:
print(f"now borrowing mutable {my_ref}")
my_ref <<= 1

with my_value.mut():
my_value <<= 2

test(my_value.mut())
print(~my_value) # 1
2 changes: 2 additions & 0 deletions compile_flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-I
/usr/include/python3.8
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools", "toml"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -23,7 +23,7 @@ dependencies = [
"typing_extensions",
"varname"
]
version = "3.0.0"
version = "3.0.1"

[project.urls]
Documentation = "https://pointers.zintensity.dev"
Expand Down
16 changes: 15 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import toml
from setuptools import Extension, setup

with open("./README.md") as f:
long_desc: str = f.read()

if __name__ == "__main__":
with open("./pyproject.toml", "r") as f:
data = toml.load(f)
setup(
name="pointers.py",
version="3.0.1",
packages=["pointers"],
project_urls=data["project"]["urls"],
package_dir={"": "src"},
ext_modules=[Extension("_pointers", ["./src/mod.c"])],
license="MIT",
ext_modules=[
Extension(
"_pointers",
["./src/mod.c"]
)
],
)

0 comments on commit 517025a

Please sign in to comment.