diff --git a/src/pynxtools/_build_wrapper.py b/_build_wrapper.py similarity index 100% rename from src/pynxtools/_build_wrapper.py rename to _build_wrapper.py diff --git a/pyproject.toml b/pyproject.toml index e3a5a81f2..51b266a36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] requires = ["setuptools>=64.0.1", "setuptools-scm[toml]>=6.2"] -backend-path = ["src/pynxtools"] build-backend = "_build_wrapper" [project] @@ -35,7 +34,6 @@ dependencies = [ "importlib-metadata", "lxml>=4.9.1", "anytree", - "setuptools>=64.0.1" ] [project.urls] diff --git a/tests/dataconverter/test_convert.py b/tests/dataconverter/test_convert.py index 55570e4d0..3ee09e8a8 100644 --- a/tests/dataconverter/test_convert.py +++ b/tests/dataconverter/test_convert.py @@ -20,12 +20,12 @@ import logging import os from pathlib import Path +import shutil import click import h5py import pytest from click.testing import CliRunner -from setuptools import distutils import pynxtools.dataconverter.convert as dataconverter from pynxtools.dataconverter.readers.base.reader import BaseReader @@ -34,7 +34,7 @@ def move_xarray_file_to_tmp(tmp_path): """Moves the xarray file, which is used to test linking into the tmp_path directory.""" - distutils.file_util.copy_file( + shutil.copy( os.path.join( os.getcwd(), "src", "pynxtools", "data", "xarray_saved_small_calibration.h5" ), @@ -49,7 +49,7 @@ def restore_xarray_file_from_tmp(tmp_path): os.getcwd(), "src", "pynxtools", "data", "xarray_saved_small_calibration.h5" ) ) - distutils.file_util.move_file( + shutil.move( os.path.join(tmp_path, "xarray_saved_small_calibration.h5"), os.path.join( os.getcwd(), "src", "pynxtools", "data", "xarray_saved_small_calibration.h5" diff --git a/tests/dataconverter/test_helpers.py b/tests/dataconverter/test_helpers.py index 0401862db..32582b5e2 100644 --- a/tests/dataconverter/test_helpers.py +++ b/tests/dataconverter/test_helpers.py @@ -21,10 +21,10 @@ import os import xml.etree.ElementTree as ET from typing import Optional +import shutil import numpy as np import pytest -from setuptools import distutils from pynxtools.dataconverter import helpers from pynxtools.dataconverter.template import Template @@ -148,7 +148,7 @@ def fixture_filled_test_data(template, tmp_path): # Copy original measurement file to tmp dir, # because h5py.ExternalLink is modifying it while # linking the nxs file. - distutils.file_util.copy_file( + shutil.copy( os.path.join( os.getcwd(), "src", "pynxtools", "data", "xarray_saved_small_calibration.h5" ),