Skip to content

Commit 21604ee

Browse files
committed
Adding data to pypi package.
1 parent 608fdfa commit 21604ee

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎pubplot/fonts/README‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ generally found in
33
<base>/lib/python3.6/site-packages/matplotlib//mpl-data/fonts/ttf
44
and from some default included with the MacOS distribution. The files
55
in this folder are intended to populate the mpl-data folder on
6-
matplotlib installed for any server. Use the "setup" command to do so;
6+
matplotlib installed for any server. Use the "fontsetup" command to do so;
77
this shell script will delete the existing font caches.
88

‎pubplot/rc.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def add(category, kwargs): # pass
326326
for _name,_colors in _opencolors.items(): # iterate through json values
327327
for _i,_color in enumerate(_colors):
328328
mcolors.OPEN_COLORS[_name+str(_i)] = _color
329-
_xkcdcolors = np.genfromtxt(f'{os.path.dirname(__file__)}/xkcd.txt',
329+
_xkcdcolors = np.genfromtxt(f'{os.path.dirname(__file__)}/colors/xkcd.txt',
330330
delimiter='\t', dtype=str, comments='%', usecols=(0,1)).tolist()
331331
mcolors.XKCD_SORTED = {tup[0]:tup[1] for i,tup in enumerate(_xkcdcolors[::-1])
332332
if i<256} # filter to N most popular

‎setup.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
from setuptools import setup
2+
# For including non-python data, see:
3+
# https://stackoverflow.com/a/1857436/4970632
24
setup(
35
# Needed to silence warnings (and to be a worthwhile package)
46
name = 'PubPlot',
57
url = 'https://github.com/lukelbd/pubplot',
68
author = 'Luke Davis',
79
author_email = 'lukelbd@gmail.com',
8-
# Needed to actually package something
9-
packages = ['pubplot'],
10+
# Package stuff
11+
# Also include package data
12+
packages = ['pubplot'],
13+
package_data = {'': ['cmaps/*', 'fonts/*', 'colors/*']},
1014
# Command-line scripts
1115
scripts = ['scripts/fontsetup'],
1216
# Needed for dependencies

0 commit comments

Comments
 (0)