-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from AlexandrovLab/u56_m2
U56 m2
- Loading branch information
Showing
79 changed files
with
30,847 additions
and
98 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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include fonts/* | ||
include reference_formats/* | ||
include sigProfilerPlotting/fonts/* | ||
include sigProfilerPlotting/reference_formats/* | ||
include tests/* |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import os | ||
import shutil | ||
import warnings | ||
|
||
from setuptools import setup | ||
from setuptools.command.install import install | ||
|
@@ -15,7 +14,7 @@ def readme(): | |
return f.read() | ||
|
||
|
||
VERSION = "1.3.14" | ||
VERSION = "1.3.15" | ||
|
||
|
||
def write_version_py(filename="sigProfilerPlotting/version.py"): | ||
|
@@ -28,54 +27,17 @@ def write_version_py(filename="sigProfilerPlotting/version.py"): | |
""" | ||
fh = open(filename, "w") | ||
fh.write( | ||
cnt % {"version": VERSION,} | ||
cnt | ||
% { | ||
"version": VERSION, | ||
} | ||
) | ||
fh.close() | ||
|
||
|
||
write_version_py() | ||
|
||
|
||
# Set up the machinery to install custom fonts. Subclass the setup tools install | ||
# class in order to run custom commands during installation. | ||
class move_ttf(install): | ||
def run(self): | ||
""" | ||
Performs the usual install process and then copies the True Type fonts | ||
that come with clearplot into matplotlib's True Type font directory, | ||
and deletes the matplotlib fontList.cache | ||
""" | ||
# Perform the usual install process | ||
install.run(self) | ||
# Try to install custom fonts | ||
try: | ||
import os, shutil | ||
import matplotlib | ||
import matplotlib.font_manager | ||
|
||
# Find where matplotlib stores its True Type fonts | ||
mpl_data_dir = os.path.dirname(matplotlib.matplotlib_fname()) | ||
mpl_ttf_dir = os.path.join(mpl_data_dir, "fonts", "ttf") | ||
cp_ttf_dir = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
file_names = [ | ||
"Times New Roman.ttf", | ||
"Arial.ttf", | ||
"Courier New.ttf", | ||
"Courier New Bold.ttf", | ||
"Arial Bold.ttf", | ||
"Times New Roman Bold.ttf", | ||
] | ||
for file in file_names: | ||
old_path = os.path.join(cp_ttf_dir, "fonts/" + file) | ||
new_path = os.path.join(mpl_ttf_dir, file) | ||
shutil.copyfile(old_path, new_path) | ||
matplotlib.font_manager._rebuild() | ||
|
||
except: | ||
warnings.warn("WARNING: An issue occured while installing the fonts.") | ||
|
||
|
||
with open("README.md") as f: | ||
readme = f.read() | ||
|
||
|
@@ -89,15 +51,25 @@ def run(self): | |
author="Erik Bergstrom", | ||
author_email="[email protected]", | ||
license="UCSD", | ||
packages=["sigProfilerPlotting"], | ||
packages=[ | ||
"sigProfilerPlotting", | ||
"sigProfilerPlotting.reference_formats", | ||
"sigProfilerPlotting.fonts", | ||
], | ||
install_requires=[ | ||
"matplotlib>=3.4.3", | ||
"pandas>=1.2.4,<2.0.0", | ||
"scikit-learn>=1.1.3", | ||
"pillow>=10.0.0", | ||
], | ||
extras_require={ | ||
"tests": [ | ||
"pytest", | ||
"scikit-image>=0.21.0", | ||
"numpy>=1.21.2", | ||
], | ||
}, | ||
package_data={"": ["fonts/*.ttf"]}, | ||
include_package_data=True, | ||
# Specify the custom install class | ||
cmdclass={"install": move_ttf}, | ||
zip_safe=False, | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.