From d1c571efaf69a13f960613c7380431bcb52451e2 Mon Sep 17 00:00:00 2001 From: tubiana Date: Sat, 6 Apr 2019 18:58:32 +0200 Subject: [PATCH] Some changes made for anaconda packaging... --- README.md | 24 +++++++----------------- setup.py | 2 +- ttclust/__init__.py | 1 + ttclust/ttclust.py | 8 ++++++-- ttclust/version.py | 2 +- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 876fb83..958dea8 100644 --- a/README.md +++ b/README.md @@ -20,28 +20,18 @@ Link to the GUI : https://github.com/tubiana/ttclustGUI ## Installation -### Instalation with PIP +### Instalation with Conda +If you want an easy installation of ttclust, I suggest these steps: -TTclust can be install from the Python Package index with -`pip install ttclust` +1. If you don't have conda (or Python) installed, Install miniconda (https://docs.conda.io/en/latest/miniconda.html) (with Python3, it's the future...) +2. Install with the command `conda install -c tubiana -c conda-forge ttclust` -You can simply use ttclust then with `ttclust` +### Instalation with PIP +1. Install numpy and cython with pip : `pip install cython numpy` +2. Install ttclust `pip install ttclust` - NOTE : You need to install numpy & mdtraj first, either with pip (`pip instal numpy mdtraj`) or conda (`conda install -c omnia mdtraj`). I strongly suggest you to use conda because pip will compile mdtraj and increase the the chance that the install fails (cgg/microsoft visual C++ library....). -### Instalation with Conda -If you want an "easy" installation of ttclust within a conda environement, I suggest these steps: - -1. Install miniconda (https://docs.conda.io/en/latest/miniconda.html) -2. Download environement file -`wget https://raw.githubusercontent.com/tubiana/TTClust/master/create_envir_with_ttclust.yml` -3. install the environement (it will install ttclust from PyPI at the end): -`conda env create -f create_envir_with_ttclust.yml` -4. Now TTClust is installed, just activate the environement to run `ttclust` command : -`conda activate ttclust` -`ttclust -f <...> -t <...>` - ### Installation & usage from sources 1. Clone this repo `git clone https://github.com/tubiana/ttclust` diff --git a/setup.py b/setup.py index 216a8d8..344f7f9 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ MAJOR = 4 MINOR = 6 -PATCH = 6 +PATCH = 7 VERSION = "{}.{}.{}".format(MAJOR, MINOR, PATCH) with open("ttclust/version.py", "w") as f: diff --git a/ttclust/__init__.py b/ttclust/__init__.py index e69de29..7152555 100644 --- a/ttclust/__init__.py +++ b/ttclust/__init__.py @@ -0,0 +1 @@ +from .version import __version__ \ No newline at end of file diff --git a/ttclust/ttclust.py b/ttclust/ttclust.py index 2455ad5..3cf3ed0 100644 --- a/ttclust/ttclust.py +++ b/ttclust/ttclust.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- __author__ = "Thibault TUBIANA" -__version__ = "4.6.5" __license__ = "GNU GPLv3" __date__ = "2018/02" @@ -22,7 +21,12 @@ import progressbar as pg import scipy.cluster.hierarchy as sch -from version import __version__ +try : + #This if the "builded" import version + from .version import __version__ +except: + #for usage from sources + from version import __version__ from prettytable import PrettyTable from sklearn import manifold diff --git a/ttclust/version.py b/ttclust/version.py index 0726e0a..8d22ea9 100644 --- a/ttclust/version.py +++ b/ttclust/version.py @@ -1 +1 @@ -__version__ = '4.6.6' +__version__ = '4.6.7'