File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ filenames_default = [
4+ "pyproject.toml" ,
5+ "src/flint/__init__.py" ,
6+ "doc/source/conf.py" ,
7+ "src/flint/test/test_all.py" ,
8+ ]
9+
10+ def main (version2 = None , * filenames ):
11+ """Bump version number in files.
12+
13+ $ bin/bump_version.py
14+ Current version: 0.1.0
15+
16+ $ bin/bump_version.py 0.1.0 0.1.1
17+ Set version 0.1.0 to 0.1.1 in:
18+ pyproject.toml
19+ src/flint/__init__.py
20+ doc/source/conf.py
21+ src/flint/test/test_all.py
22+
23+ """
24+ with open ("pyproject.toml" , "r" ) as f :
25+ text = f .read ()
26+ version1 = text .split ("version = \" " )[1 ].split ("\" " )[0 ]
27+
28+ if not version2 :
29+ print (f"Current version: { version1 } " )
30+ return
31+
32+ if not filenames :
33+ filenames = filenames_default
34+
35+ print (f"Set version { version1 } to { version2 } in:" )
36+ for filename in filenames :
37+ print (filename )
38+ with open (filename , "r" ) as f :
39+ text = f .read ()
40+ with open (filename , "w" ) as f :
41+ f .write (text .replace (version1 , version2 ))
42+
43+ if __name__ == "__main__" :
44+ import sys
45+ main (* sys .argv [1 :])
Original file line number Diff line number Diff line change 5151# built documents.
5252#
5353# The short X.Y version.
54- version = '0.7.0a2 '
54+ version = '0.7.0a3 '
5555# The full version, including alpha/beta/rc tags.
56- release = '0.7.0a2 '
56+ release = '0.7.0a3 '
5757
5858# The language for content autogenerated by Sphinx. Refer to documentation
5959# for a list of supported languages.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ build-backend = "mesonpy"
55[project ]
66name = " python-flint"
77description = " Bindings for FLINT and Arb"
8- version = " 0.7.0a2 "
8+ version = " 0.7.0a3 "
99urls = {Homepage = " https://github.com/flintlib/python-flint" }
1010authors = [
1111 {name = " Fredrik Johansson" , email = " fredrik.johansson@gmail.com" },
Original file line number Diff line number Diff line change 4343 Ordering ,
4444)
4545
46- __version__ = '0.7.0a2 '
46+ __version__ = '0.7.0a3 '
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def raises(f, exception):
3232
3333def test_pyflint ():
3434
35- assert flint .__version__ == "0.7.0a2 "
35+ assert flint .__version__ == "0.7.0a3 "
3636
3737 ctx = flint .ctx
3838 assert str (ctx ) == repr (ctx ) == _default_ctx_string
You can’t perform that action at this time.
0 commit comments