Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 646 install #680

Merged
merged 21 commits into from
Feb 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions pybamm/__init__.py
Original file line number Diff line number Diff line change
@@ -10,19 +10,9 @@

#
# Version info
# Keep up to date with setup.py!
#
def _load_version_int():
try:
root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(root, "version"), "r") as f:
version = f.read().strip().split(",")
major, minor, revision = [int(x) for x in version]
return major, minor, revision
except Exception as e:
raise RuntimeError("Unable to read version number (" + str(e) + ").")


__version_int__ = _load_version_int()
__version_int__ = (0, 1, 0)
__version__ = ".".join([str(x) for x in __version_int__])
if sys.version_info[0] < 3:
del x # Before Python3, list comprehension iterators leaked
1 change: 0 additions & 1 deletion pybamm/version

This file was deleted.

16 changes: 3 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -8,22 +8,12 @@
readme = f.read()


# Read version number from file
def load_version():
try:
import os

root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(root, "pybamm", "version"), "r") as f:
version = f.read().strip().split(",")
return ".".join([str(int(x)) for x in version])
except Exception as e:
raise RuntimeError("Unable to read version number (" + str(e) + ").")

# Keep up to date with __init__!
version = "0.1.0"

setup(
name="pybamm",
version=load_version(),
version=version,
description="Python Battery Mathematical Modelling.",
long_description=readme,
url="https://github.com/pybamm-team/PyBaMM",