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

Fix pip installation #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion morphsnakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
]

__version__ = (2, 1, 1)
__version_str__ = ".".join(map(str, __version__))


class _fcycle(object):
Expand Down
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,31 @@
except ImportError:
from distutils.core import setup

from morphsnakes import __version_str__

def get_version():
""" Avoid importing package before dependencies are installed. """
values = {}
with open("morphsnakes.py", "r") as f:
for line in f.readlines():
if "__version__" in line:
exec(line, {}, values)
break

version = values.get("__version__", (0, 1, 0))
return ".".join(map(str, version))


setup(
name="morphsnakes",
version=__version_str__,
version=get_version(),
description="Morphological Snakes",
author="Pablo Márquez Neila",
author_email="[email protected]",
url="https://github.com/pmneila/morphsnakes",
license="BSD 3-clause",
# packages=["morphsnakes"],
py_modules=["morphsnakes"],
requires=['numpy', 'scipy'],
install_requires=['numpy', 'scipy'],
long_description="""
The Morphological Snakes are a family of methods for image-guided
evolution of curves and surfaces represented as a level-set of an embedding
Expand Down