Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolating pulser-pasqal version and release process #733

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pulser-core
pulser-simulation
pulser-pasqal
pulser-simulation
1 change: 1 addition & 0 deletions pulser-pasqal/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.20.1
3 changes: 1 addition & 2 deletions pulser-pasqal/pulser_pasqal/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
1 change: 1 addition & 0 deletions pulser-pasqal/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pulser-core >= 0.20
pasqal-cloud ~= 0.12
backoff ~= 2.2
5 changes: 1 addition & 4 deletions pulser-pasqal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@
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
os.chdir(current_directory)

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"
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading