Skip to content

Commit 8c5d588

Browse files
committed
Still working around...
1 parent 78178b7 commit 8c5d588

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from build import SRC_DIR, OTS_SRC_DIR
21
from distutils.dir_util import mkpath, remove_tree
32
from distutils import log
43
import io
54
import os
65
import re
6+
from pathlib import Path
77
from setuptools import setup, Extension, Command
88
from setuptools.command import build_py
99
from setuptools.command.egg_info import egg_info
@@ -12,6 +12,15 @@
1212

1313
PY = sys.executable
1414

15+
# Define paths (previously imported from build.py)
16+
try:
17+
ROOT = Path(__file__).parent.resolve()
18+
except NameError:
19+
# Fallback for when __file__ is not defined
20+
ROOT = Path.cwd()
21+
SRC_DIR = ROOT / "src"
22+
OTS_SRC_DIR = SRC_DIR / "ots"
23+
1524
BUILD_DIR = OTS_SRC_DIR / "build" / "meson"
1625
BUILD_SUB_DIR = BUILD_DIR / "subprojects"
1726
SRC_SUB_DIR = OTS_SRC_DIR / "subprojects"

0 commit comments

Comments
 (0)