Skip to content

Commit f9969cb

Browse files
authored
Update PyPi Build (#81)
* Update cibuildwheel version * Fix Interval __str__ and __repr__ * Switch to release PyPi
1 parent 4bde021 commit f9969cb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/pypi.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/[email protected]
4141

4242
- name: Build wheels
43-
uses: pypa/cibuildwheel@v2.12.1
43+
uses: pypa/cibuildwheel@v2.16.2
4444
# to supply options, put them in 'env', like:
4545
env:
4646
MACOSX_DEPLOYMENT_TARGET: "10.14"
@@ -86,7 +86,7 @@ jobs:
8686
with:
8787
user: __token__
8888
# To test:
89-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
90-
repository-url: https://test.pypi.org/legacy/
89+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
90+
# repository-url: https://test.pypi.org/legacy/
9191
# To release:
92-
# password: ${{ secrets.PYPI_API_TOKEN }}
92+
password: ${{ secrets.PYPI_API_TOKEN }}

python/src/utils/interval.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ void define_interval(py::module_& m)
4545
.def(
4646
"__str__",
4747
[](const Interval& self) {
48-
return (std::stringstream() << self).str();
48+
std::stringstream ss;
49+
ss << self;
50+
return ss.str();
4951
})
5052
.def(
5153
"__repr__",
5254
[](const Interval& self) {
53-
return (std::stringstream()
54-
<< "Interval(" << self.INF << ", " << self.SUP << ")")
55-
.str();
55+
std::stringstream ss;
56+
ss << "Interval(" << self.INF << ", " << self.SUP << ")";
57+
return ss.str();
5658
})
5759
.DEF_BIN_OP("add", a + b)
5860
.DEF_UN_OP("pos", +i)

0 commit comments

Comments
 (0)