Skip to content

Commit

Permalink
Add version
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarhiggott committed Nov 23, 2020
1 parent 215f104 commit 5854ecc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,23 @@ def build_extension(self, ext):
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)


version = {}
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here,"src/pymatching/_version.py")) as fp:
exec(fp.read(), version)


setup(
name='PyMatching',
version='0.0.1',
version=version['__version__'],
author='Oscar Higgott',
description='A C++ implementation of the Minimum Weight Perfect Matching decoder, with Python bindings.',
ext_modules=[CMakeExtension('pymatching._cpp_mwpm')],
packages=find_packages("src"),
package_dir={'':'src'},
cmdclass=dict(build_ext=CMakeBuild),
install_requires=['scipy', 'numpy', 'networkx', 'cmake'],
python_requires='>=3.6',
zip_safe=False,
)
15 changes: 15 additions & 0 deletions src/pymatching/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2020 Oscar Higgott

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.2.0.dev0"

0 comments on commit 5854ecc

Please sign in to comment.