Commit a1c0d4d6 authored by Yori's avatar Yori
Browse files

Add the git version (last tag) in setup.py

modify README.md
parent aebfe921
Pipeline #727 failed with stage
...@@ -102,41 +102,33 @@ be spread, allowing fast and consistent corrections. ...@@ -102,41 +102,33 @@ be spread, allowing fast and consistent corrections.
making it fast and safe making it fast and safe
# 3. Install from source **(without an account at gitlab.aip.de)** # 3. Install from source **(without an account at gitlab.aip.de)**
### STEP 1: download source of the module myplotlib ### STEP 1: download source of the module myplotlib
- [zip](https://gitlab.aip.de/yfournier/myplotlib/repository/archive.zip?ref=v3.0.1a) - [zip](https://gitlab.aip.de/yfournier/myplotlib/repository/archive.zip?ref=5.8.18-rc)
- [tar.gz](https://gitlab.aip.de/yfournier/myplotlib/repository/archive.tar.gz?ref=v3.0.1a) - [tar.gz](https://gitlab.aip.de/yfournier/myplotlib/repository/archive.tar.gz?ref=5.8.18-rc)
extract and rename like `/home/user/src/python/myplotlib` extract and rename like `/home/user/src/python/myplotlib`
### STEP 2: Install ### STEP 2: Install
Set the python path
```
export PYTHONPATH="/home/user/src/python/"
```
Create your config file (in `/home/user/src/python/myplotlib/`)
``` ```
cp config-default.py config.py python setup.py install
``` ```
### STEP 3: testing ### STEP 3: testing
in `/home/user/src/python/` in `/home/user/src/python/myplotlib/test/localhost/`
``` ```
python2.6 -m myplotlib.__main__ -t python -m tests
python2.7 -m myplotlib -t python -m tutorials
python3 -m myplotlib -t
``` ```
This will execute a series of tests, they should all be successful. This will execute a series of tests, they should all be successful.
> **REMARK**: If you get some errors, try the minimal configuration: replace config.py with myplotlib/.configs/minimal-config.py > **REMARK**: If you get some errors, try the minimal configuration: ...
# 4. Install with git (with an account at gitlab.aip.de) # 4. Install with git (with an account at gitlab.aip.de)
......
from subprocess import Popen, PIPE
import setuptools import setuptools
try:
process = Popen(['git', 'describe', '--exact-match', '--tags'], stdout=PIPE, stderr=PIPE)
stdout, stderr = process.communicate()
version = stdout.decode('ascii')
except:
raise
with open("README.md", "r") as fh: with open("README.md", "r") as fh:
long_description = fh.read() long_description = fh.read()
setuptools.setup( setuptools.setup(
name="myplotlib", name="myplotlib",
version='5.6.16b', # toward-v6 branch (still beta) version=version,
author='Yori Fournier, Philipp Gast', author='Yori Fournier, Philipp Gast',
author_email='y.fournier@aip.de ???', author_email='y.fournier@aip.de ???',
description='clean alternative to pyplot -- a wrapper around core API of matplotlib', description='clean alternative to pyplot -- a wrapper around core API of matplotlib',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment