-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1261852
commit 2844e77
Showing
12 changed files
with
143 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# python stuff | ||
*.pyc | ||
*/__pycache__ | ||
build/ | ||
dist/ | ||
mpl_chord_diagram.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Include the license file | ||
include LICENSE | ||
include Readme.md | ||
|
||
# include setup.py | ||
include setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,8 @@ | |
""" | ||
|
||
from .chord_diagram import chord_diagram | ||
|
||
|
||
__version__ = "0.1.0" | ||
|
||
__author__ = "Tanguy Fardet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bdist_wheel] | ||
# This flag says that the code is written to work on both Python 2 and Python | ||
# 3. If at all possible, it is good practice to do this. If you cannot, you | ||
# will need to generate wheels for each Python version that you support. | ||
universal=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import os, errno | ||
from setuptools import setup, find_packages | ||
|
||
|
||
# create directory | ||
setup_dir = os.path.abspath(os.path.dirname(__file__)) | ||
directory = setup_dir + '/mpl_chord_diagram/' | ||
|
||
try: | ||
os.makedirs(directory) | ||
except OSError as e: | ||
if e.errno != errno.EEXIST: | ||
raise | ||
|
||
|
||
# move important files | ||
move = ( | ||
'__init__.py', | ||
'LICENSE', | ||
'chord_diagram.py', | ||
'gradient.py', | ||
'utilities.py', | ||
'example.py', | ||
) | ||
|
||
|
||
for fname in move: | ||
try: | ||
os.rename(fname, directory + fname) | ||
except Exception as e: | ||
print(e) | ||
|
||
|
||
from mpl_chord_diagram import __version__ | ||
|
||
long_descr = ''' | ||
The module enables to plot chord diagrams with matplotlib from lists, | ||
numpy or scipy sparse matrices. | ||
It provides tunable parameters such as arc sorting based on size or distance, | ||
and supports gradients to better visualize source and target regions. | ||
''' | ||
|
||
|
||
try: | ||
# install | ||
setup( | ||
name = 'mpl_chord_diagram', | ||
version = __version__, | ||
description = 'Python module to plot chord diagrams with matplotlib.', | ||
package_dir = {'': '.'}, | ||
packages = find_packages('.'), | ||
|
||
# Include the non python files: | ||
package_data = {'': ['LICENSE', '*.md']}, | ||
|
||
# Requirements | ||
install_requires = ['numpy', 'scipy', 'matplotlib'], | ||
|
||
# Metadata | ||
url = 'https://github.com/Silmathoron/mpl_chord_diagram', | ||
author = 'Tanguy Fardet', | ||
author_email = '[email protected]', | ||
license = 'MIT', | ||
keywords = 'chord diagram matplotlib plotting', | ||
long_description = long_descr, | ||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT License', | ||
'Natural Language :: English', | ||
'Programming Language :: Python :: 3', | ||
'Operating System :: OS Independent', | ||
'Topic :: Scientific/Engineering :: Visualization', | ||
'Framework :: Matplotlib', | ||
] | ||
) | ||
except: | ||
pass | ||
finally: | ||
for fname in move: | ||
try: | ||
os.rename(directory + fname, fname) | ||
except: | ||
pass |