Skip to content

Commit 517025a

Browse files
Merge pull request #34 from ZeroIntensity/3.0.1
fix #33
2 parents fcaa2c4 + eb37275 commit 517025a

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

a.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from pointers import Reference, MutReference, ref
2+
3+
my_value = ref(0)
4+
5+
def test(my_ref: MutReference[int]) -> None:
6+
print(f"now borrowing mutable {my_ref}")
7+
my_ref <<= 1
8+
9+
with my_value.mut():
10+
my_value <<= 2
11+
12+
test(my_value.mut())
13+
print(~my_value) # 1

compile_flags.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-I
2+
/usr/include/python3.8

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools", "toml"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -23,7 +23,7 @@ dependencies = [
2323
"typing_extensions",
2424
"varname"
2525
]
26-
version = "3.0.0"
26+
version = "3.0.1"
2727

2828
[project.urls]
2929
Documentation = "https://pointers.zintensity.dev"

setup.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
import toml
12
from setuptools import Extension, setup
23

4+
with open("./README.md") as f:
5+
long_desc: str = f.read()
6+
37
if __name__ == "__main__":
8+
with open("./pyproject.toml", "r") as f:
9+
data = toml.load(f)
410
setup(
511
name="pointers.py",
12+
version="3.0.1",
613
packages=["pointers"],
14+
project_urls=data["project"]["urls"],
715
package_dir={"": "src"},
8-
ext_modules=[Extension("_pointers", ["./src/mod.c"])],
16+
license="MIT",
17+
ext_modules=[
18+
Extension(
19+
"_pointers",
20+
["./src/mod.c"]
21+
)
22+
],
923
)

0 commit comments

Comments
 (0)