diff --git a/packages.txt b/packages.txt index c76983836..888e92d31 100644 --- a/packages.txt +++ b/packages.txt @@ -1,3 +1,2 @@ pulser-core -pulser-simulation -pulser-pasqal \ No newline at end of file +pulser-simulation \ No newline at end of file diff --git a/pulser-pasqal/VERSION.txt b/pulser-pasqal/VERSION.txt new file mode 100644 index 000000000..9d2632160 --- /dev/null +++ b/pulser-pasqal/VERSION.txt @@ -0,0 +1 @@ +0.20.1 \ No newline at end of file diff --git a/pulser-pasqal/pulser_pasqal/_version.py b/pulser-pasqal/pulser_pasqal/_version.py index 7b37d81be..0ad1c76b2 100644 --- a/pulser-pasqal/pulser_pasqal/_version.py +++ b/pulser-pasqal/pulser_pasqal/_version.py @@ -13,8 +13,7 @@ # limitations under the License. from pathlib import PurePath -# Sets the version to the same as 'pulser'. -version_file_path = PurePath(__file__).parent.parent.parent / "VERSION.txt" +version_file_path = PurePath(__file__).parent.parent / "VERSION.txt" with open(version_file_path, "r", encoding="utf-8") as f: __version__ = f.read().strip() diff --git a/pulser-pasqal/requirements.txt b/pulser-pasqal/requirements.txt index 7b3f97f80..12fb10e9b 100644 --- a/pulser-pasqal/requirements.txt +++ b/pulser-pasqal/requirements.txt @@ -1,2 +1,3 @@ +pulser-core >= 0.20 pasqal-cloud ~= 0.12 backoff ~= 2.2 \ No newline at end of file diff --git a/pulser-pasqal/setup.py b/pulser-pasqal/setup.py index a202df7c8..631cd4d29 100644 --- a/pulser-pasqal/setup.py +++ b/pulser-pasqal/setup.py @@ -25,9 +25,7 @@ current_directory = Path(__file__).parent # Reads the version from the VERSION.txt file -with open( - current_directory.parent / "VERSION.txt", "r", encoding="utf-8" -) as f: +with open(current_directory / "VERSION.txt", "r", encoding="utf-8") as f: __version__ = f.read().strip() # Changes to the directory where setup.py is @@ -35,7 +33,6 @@ with open("requirements.txt", encoding="utf-8") as f: requirements = f.read().splitlines() -requirements.append(f"pulser-core=={__version__}") # Stashes the source code for the local version file local_version_fpath = Path(package_name) / "_version.py" diff --git a/setup.py b/setup.py index 2e094929e..5a739adc1 100644 --- a/setup.py +++ b/setup.py @@ -25,8 +25,13 @@ "`make dev-install` instead." ) +# Pulser packages not pinned to __version__ +requirements = [ + "pulser-pasqal", +] +# Adding packages pinned to __version__ with open("packages.txt", "r", encoding="utf-8") as f: - requirements = [f"{pkg.strip()}=={__version__}" for pkg in f.readlines()] + requirements += [f"{pkg.strip()}=={__version__}" for pkg in f.readlines()] # Just a meta-package that requires all pulser packages setup( diff --git a/tests/test_pasqal.py b/tests/test_pasqal.py index 6382f5898..bf7ee6f15 100644 --- a/tests/test_pasqal.py +++ b/tests/test_pasqal.py @@ -24,7 +24,6 @@ from pasqal_cloud.device.configuration import EmuFreeConfig, EmuTNConfig import pulser -import pulser_pasqal from pulser.backend.config import EmulatorConfig from pulser.backend.remote import ( BatchStatus, @@ -44,10 +43,6 @@ root = Path(__file__).parent.parent -def test_version(): - assert pulser_pasqal.__version__ == pulser.__version__ - - @dataclasses.dataclass class CloudFixture: pasqal_cloud: PasqalCloud