Skip to content

Commit cd43ee1

Browse files
author
Muhammad Naufal Andika Natsir Putra
committed
fix: remove deprecated package from setup.py, run pip install in Dockerfile
1 parent 2ce16a0 commit cd43ee1

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

python/sdk/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ RUN apt-get update && apt-get install build-essential curl vim wget -y
1010

1111
COPY . .${WORKDIR}
1212

13+
RUN pip install "setuptools>=64,<75" "setuptools_scm>=8" "twine" "wheel"
14+
1315
RUN pip install .
1416
RUN pip install ".[test]"

python/sdk/setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
import imp
16+
import importlib.util
1717
import os
1818

1919
from setuptools import find_packages, setup
2020

21-
version = imp.load_source(
22-
"merlin.version", os.path.join("merlin", "version.py")
23-
).VERSION
21+
# get version from version.py
22+
spec = importlib.util.spec_from_file_location(
23+
"sdk.version", os.path.join("merlin/version.py")
24+
)
25+
26+
v_module = importlib.util.module_from_spec(spec)
27+
spec.loader.exec_module(v_module)
28+
29+
version = v_module.VERSION
2430

2531
with open("requirements.txt") as f:
2632
REQUIRE = f.read().splitlines()

0 commit comments

Comments
 (0)