Skip to content

Commit bcf434f

Browse files
update python to 311, 312
1 parent 176df2c commit bcf434f

File tree

4 files changed

+14
-26
lines changed

4 files changed

+14
-26
lines changed

.github/workflows/build_and_upolad.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
matrix:
8282
os: [ubuntu-latest, macos-latest, windows-latest]
8383
arch: [x86_64, AMD64, i686, arm64]
84-
python: [36, 37, 38, 39, 310, 311]
84+
python: [36, 37, 38, 39, 310, 311, 312, 313]
8585

8686
exclude:
8787
- os: ubuntu-latest

README.rst

+3-14
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
.. image:: https://readthedocs.org/projects/pyqubo/badge/?version=latest
88
:target: http://pyqubo.readthedocs.io/en/latest/?badge=latest
99

10-
.. image:: https://pepy.tech/badge/pyqubo
11-
:target: https://pepy.tech/project/pyqubo
10+
.. image:: https://static.pepy.tech/badge/pyqubo
11+
:target: https://www.pepy.tech/projects/pyqubo
1212

1313
.. image:: https://github.com/recruit-communications/pyqubo/actions/workflows/build_and_upolad.yaml/badge.svg
1414
:target: https://github.com/recruit-communications/pyqubo/actions/workflows/build_and_upolad.yaml
@@ -111,11 +111,6 @@ or
111111
112112
python -m pip install .
113113
114-
Supported Python Versions
115-
-------------------------
116-
117-
Python 3.6, 3.7, 3.8, 3.9 and 3.10 are supported.
118-
119114
Supported Operating Systems
120115
---------------------------
121116

@@ -133,7 +128,7 @@ Run all tests.
133128
.. code-block:: shell
134129
135130
export USE_TEST=1
136-
python -m unittest discover test
131+
python -m unittest discover tests
137132
138133
Show coverage report.
139134

@@ -143,12 +138,6 @@ Show coverage report.
143138
coverage run -m unittest discover
144139
coverage html
145140
146-
Run test with circleci CLI.
147-
148-
.. code-block:: shell
149-
150-
circleci build --job $JOBNAME
151-
152141
Run doctest.
153142

154143
.. code-block:: shell

external/pybind11.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include(FetchContent)
33
FetchContent_Declare(
44
pybind11
55
GIT_REPOSITORY https://github.com/pybind/pybind11
6-
GIT_TAG v2.10.1
6+
GIT_TAG v2.13.6
77
)
88

99
FetchContent_MakeAvailable(pybind11)

setup.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
# The name must be the _single_ output extension from the CMake build.
2121
# If you need multiple extensions, see scikit-build.
2222
class CMakeExtension(Extension):
23-
def __init__(self, name, sourcedir=""):
24-
Extension.__init__(self, name, sources=[])
25-
self.sourcedir = os.path.abspath(sourcedir)
23+
def __init__(self, name: str, sourcedir: str = "") -> None:
24+
super().__init__(name, sources=[])
25+
self.sourcedir = os.fspath(Path(sourcedir).resolve())
2626

2727

2828
class CMakeBuild(build_ext):
2929
def build_extension(self, ext: CMakeExtension) -> None:
3030
# Must be in this form due to bug in .resolve() only fixed in Python 3.10+
31-
ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name) # type: ignore[no-untyped-call]
31+
ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name)
3232
extdir = ext_fullpath.parent.resolve()
3333

3434
# Using this requires trailing slash for auto-detection & inclusion of
@@ -56,7 +56,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
5656
cmake_args += [item for item in os.environ["CMAKE_ARGS"].split(" ") if item]
5757

5858
# In this example, we pass in the version to C++. You might not need to.
59-
cmake_args += [f"-DEXAMPLE_VERSION_INFO={self.distribution.get_version()}"] # type: ignore[attr-defined]
59+
cmake_args += [f"-DEXAMPLE_VERSION_INFO={self.distribution.get_version()}"]
6060

6161
if self.compiler.compiler_type != "msvc":
6262
# Using Ninja-build since it a) is available as a wheel and b)
@@ -66,7 +66,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
6666
# 3.15+.
6767
if not cmake_generator or cmake_generator == "Ninja":
6868
try:
69-
import ninja # noqa: F401
69+
import ninja
7070

7171
ninja_executable_path = Path(ninja.BIN_DIR) / "ninja"
7272
cmake_args += [
@@ -77,7 +77,6 @@ def build_extension(self, ext: CMakeExtension) -> None:
7777
pass
7878

7979
else:
80-
8180
# Single config generators are handled "normally"
8281
single_config = any(x in cmake_generator for x in {"NMake", "Ninja"})
8382

@@ -117,10 +116,10 @@ def build_extension(self, ext: CMakeExtension) -> None:
117116
build_temp.mkdir(parents=True)
118117

119118
subprocess.run(
120-
["cmake", ext.sourcedir] + cmake_args, cwd=build_temp, check=True
119+
["cmake", ext.sourcedir, *cmake_args], cwd=build_temp, check=True
121120
)
122121
subprocess.run(
123-
["cmake", "--build", "."] + build_args, cwd=build_temp, check=True
122+
["cmake", "--build", ".", *build_args], cwd=build_temp, check=True
124123
)
125124

126125

@@ -157,7 +156,7 @@ def __getattribute__(self, name):
157156
'codecov>=2.1.9'
158157
]
159158

160-
python_requires = '>=3.6, <3.12'
159+
python_requires = '>=3.6, <3.13'
161160

162161
setup(
163162
name=package_info.__package_name__,

0 commit comments

Comments
 (0)