Fixed relative path for presets folder in draw.py

This commit is contained in:
marceloprates
2022-11-08 10:38:23 -03:00
parent 03025d8232
commit 6b1a9fe79f
10 changed files with 1 additions and 13 deletions

View File

@@ -16,7 +16,6 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
""" """
import re import re
import os import os
import json import json
@@ -41,7 +40,6 @@ from typing import Optional, Union, Tuple, List, Dict, Any, Iterable
from shapely.geometry import Point, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, box from shapely.geometry import Point, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, box
from shapely.geometry.base import BaseGeometry from shapely.geometry.base import BaseGeometry
#import vsketch #import vsketch
@@ -590,7 +588,7 @@ def draw_text(
def presets_directory(): def presets_directory():
return os.path.join(pathlib.Path(__file__).resolve().parent.parent, 'presets') return os.path.join(pathlib.Path(__file__).resolve().parent, 'presets')
def create_preset( def create_preset(

View File

@@ -24,14 +24,4 @@ setup(
], ],
package_dir={'prettymaps': '.'}, package_dir={'prettymaps': '.'},
package_data={'prettymaps': ['presets/*.json']}, package_data={'prettymaps': ['presets/*.json']},
#data_files=[(presets_dir, [
# 'presets/barcelona-plotter.json',
# 'presets/barcelona.json',
# 'presets/cb-bf-f.json',
# 'presets/default.json',
# 'presets/heerhugowaard.json',
# 'presets/macao.json',
# 'presets/minimal.json',
# 'presets/tijuca.json',
#])],
) )