Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
108 changes: 108 additions & 0 deletions .zwik/zwik_environment_osx-64.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# This file belongs to the Zwik client
# it locks dependencies of your project to a known state
# please commit this file to your version control system
#
# This file is generated automatically, do not change it!
# file is created on 2025-11-28 10:02:07.746293
# lockfile integrity: a51d60043ce225f5ed39d8d11143933c
script_version: '5.16'
subdir: osx-64
yaml_hash: 0fcf58afdf3311ebc6a234a98eecd61c
channel_alias: https://conda.anaconda.org
channels:
- defaults
dependencies:
- archspec=0.2.5=pyhd8ed1ab_0
- black=25.1.0=pyh866005b_0
- boltons=25.0.0=pyhd8ed1ab_0
- brotli-python=1.2.0=py312h4b46afd_1
- bzip2=1.0.8=h500dc9f_8
- c-ares=1.34.5=hf13058a_0
- ca-certificates=2025.11.12=hbd8a1cb_0
- certifi=2025.11.12=pyhd8ed1ab_0
- cffi=2.0.0=py312he90777b_1
- charset-normalizer=3.4.4=pyhd8ed1ab_0
- click=8.3.1=pyh707e725_0
- colorama=0.4.6=pyhd8ed1ab_1
- conda-libmamba-solver=25.11.0=pyhd8ed1ab_0
- conda-package-handling=2.4.0=pyh7900ff3_2
- conda-package-streaming=0.12.0=pyhd8ed1ab_0
- conda=25.11.0=py312hb401068_0
- coverage=7.12.0=py312hacf3034_0
- cpp-expected=1.3.1=h0ba0a54_0
- distro=1.9.0=pyhd8ed1ab_1
- flake8=7.3.0=pyhd8ed1ab_0
- fmt=12.0.0=h7a3a4f9_0
- freezegun=1.5.5=pyhd8ed1ab_0
- frozendict=2.4.7=py312h80b0991_0
- h2=4.3.0=pyhcf101f3_0
- hpack=4.1.0=pyhd8ed1ab_0
- hyperframe=6.1.0=pyhd8ed1ab_0
- idna=3.11=pyhd8ed1ab_0
- importlib-metadata=8.7.0=pyhe01879c_1
- invoke=2.2.1=pyhd8ed1ab_0
- isort=7.0.0=pyhd8ed1ab_0
- jsonpatch=1.33=pyhd8ed1ab_1
- jsonpointer=3.0.0=py312hb401068_2
- krb5=1.21.3=h37d8d59_0
- libarchive=3.8.2=gpl_h889603c_100
- libcurl=8.17.0=h7dd4100_0
- libcxx=21.1.6=h3d58e20_0
- libedit=3.1.20250104=pl5321ha958ccf_0
- libev=4.33=h10d778d_2
- libexpat=2.7.3=heffb93a_0
- libffi=3.5.2=h750e83c_0
- libiconv=1.18=h57a12c2_2
- liblzma=5.8.1=hd471939_2
- libmamba=2.4.0=h3ba590b_1
- libmambapy=2.4.0=py312h5710069_1
- libnghttp2=1.67.0=h3338091_0
- libsolv=0.7.35=h6fd32b5_0
- libsqlite=3.51.0=h86bffb9_0
- libssh2=1.11.1=hed3591d_0
- libxml2-16=2.15.1=h0ad03eb_0
- libxml2=2.15.1=h23bb396_0
- libzlib=1.3.1=hd23fc13_2
- lz4-c=1.10.0=h240833e_1
- lzo=2.10=h4132b18_1002
- mccabe=0.7.0=pyhd8ed1ab_1
- menuinst=2.4.1=py312hb401068_0
- msgpack-python=1.1.2=py312hd099df3_1
- mypy_extensions=1.1.0=pyha770c72_0
- ncurses=6.5=h0622a9a_3
- nlohmann_json-abi=3.12.0=h0f90c79_1
- openssl=3.6.0=h230baf5_0
- packaging=25.0=pyh29332c3_1
- pathspec=0.12.1=pyhd8ed1ab_1
- platformdirs=4.5.0=pyhcf101f3_0
- pluggy=1.6.0=pyhd8ed1ab_0
- pybind11-abi=11=hc364b38_1
- pycodestyle=2.14.0=pyhd8ed1ab_0
- pycosat=0.6.6=py312h2f459f6_3
- pycparser=2.22=pyh29332c3_1
- pyflakes=3.4.0=pyhd8ed1ab_0
- pysocks=1.7.1=pyha55dd90_7
- python-dateutil=2.9.0.post0=pyhe01879c_2
- python=3.12.12=h74c2667_1_cpython
- python_abi=3.12=8_cp312
- readline=8.2=h7cca4af_2
- reproc-cpp=14.2.5.post0=h240833e_0
- reproc=14.2.5.post0=h6e16a3a_0
- requests=2.32.5=pyhd8ed1ab_0
- ruamel.yaml.clib=0.2.14=py312h80b0991_0
- ruamel.yaml=0.18.16=py312h80b0991_0
- ruamel_yaml=0.15.80=py312h104f124_1009
- setuptools=80.9.0=pyhff2d567_0
- simdjson=4.2.2=hcb651aa_0
- six=1.17.0=pyhe01879c_1
- tk=8.6.13=hf689a15_3
- tomli=2.3.0=pyhcf101f3_0
- tqdm=4.67.1=pyhd8ed1ab_1
- truststore=0.10.3=pyhe01879c_0
- tzdata=2025b=h78e105d_0
- urllib3=2.5.0=pyhd8ed1ab_0
- yaml-cpp=0.8.0=h92383a6_0
- yaml=0.2.5=h4132b18_3
- zipp=3.23.0=pyhd8ed1ab_0
- zstandard=0.25.0=py312h01f6755_1
- zstd=1.5.7=h8210216_2
6 changes: 2 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ Zwik is a powerful solution that allows you to create reproducible Development E

- [Getting Started](#getting-started)
- [Check the installation and/or environment](#check-installation-env)
- [Obsolete and unsafe packages](#obsolete-unsafe-packages)
- [More information](#more-information)
- [Developer notes](#building-and-testing)
- [License](#license)
- [Developer notes](#building-and-testing)
- [License](#license)

## Getting Started <a name="getting-started"></a>

Expand Down
46 changes: 16 additions & 30 deletions scripts/zwik_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from logging.handlers import RotatingFileHandler
from typing import Optional

__version__ = "5.15"
__version__ = "5.16"
min_supported_conda_version = "4.5.4"
max_supported_conda_version = "24.3.0"
min_supported_bootstrap_version = 7
Expand Down Expand Up @@ -1093,7 +1093,7 @@ def get_dependencies(self, additional_dependencies):
)
or ""
)
m = re.match(r"# +\[([a-z0-9]+)]", comment)
m = re.match(r"# +\[([a-z0-9-]+)]", comment)
Comment thread
abloemert marked this conversation as resolved.
if m and (m.group(1) not in (platform, subdir)):
continue
dep_list.append(env_dep)
Expand Down Expand Up @@ -1330,35 +1330,17 @@ def activate(self, write_dot_env=False):
pass

@staticmethod
def is_ntfs(path):
import subprocess
def has_fixed_drive(path):
Comment thread
abloemert marked this conversation as resolved.
import ctypes

# noinspection PyBroadException
try:
drive = os.path.splitdrive(os.path.realpath(path))[0]
if drive:
result = subprocess.check_output(
[
"cmd",
"/C",
"wmic",
"path",
"Win32_Volume",
"get",
"Caption,FileSystem",
],
stderr=subprocess.STDOUT,
universal_newlines=True,
)
lines = result.splitlines()
column = lines[0].find("FileSystem")
for line in lines:
caption = line[0:column].strip()
filesystem = line[column:].strip()
if caption == drive + "\\":
return filesystem == "NTFS"
DRIVE_FIXED = 3
drive = os.path.splitdrive(os.path.realpath(path))[0] + "\\"
drive_type = ctypes.windll.kernel32.GetDriveTypeW(drive)
return drive_type == DRIVE_FIXED
except Exception:
log.exception("Error checking for NTFS drive")
log.exception("Error checking for local drive")
Comment thread
abloemert marked this conversation as resolved.
return False

def link_prefix(self, link_dir):
Expand All @@ -1378,8 +1360,10 @@ def link_prefix(self, link_dir):
else:
raise

if os.name == "nt" and not self.is_ntfs(link_dir):
log.warning("Activating on non-NTFS drive can fail")
if os.name == "nt" and not self.has_fixed_drive(link_dir):
log.warning(
"WARNING: Creating a link to environment on non-NTFS drive can fail",
Comment thread
abloemert marked this conversation as resolved.
)

create_link(link_dir, self.prefix)

Expand Down Expand Up @@ -1431,6 +1415,7 @@ def fix_context(self):
"pkgs_dirs": [pkgs_dir],
"always_copy": context.always_copy,
"channel_alias": self.settings.channel_alias,
"create_default_packages": [],
}

os.environ["CONDA_PKGS_DIRS"] = pkgs_dir
Expand All @@ -1448,7 +1433,6 @@ def fix_context(self):
context.notify_outdated_conda = False
context.allow_softlinks = False
context.add_anaconda_token = False
context.create_default_packages = []
return context

def backup_env(self):
Expand Down Expand Up @@ -1992,6 +1976,8 @@ def get_unattended_msg(args):
unattended_msg = None
if args.unattended:
unattended_msg = "Unattended mode requested via command-line"
elif os.environ.get("CI", None):
unattended_msg = "CI environment detected, running unattended"
elif os.environ.get("JENKINS_HOME", None):
unattended_msg = "Jenkins environment detected, running unattended"
return unattended_msg
Expand Down
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def setUp(self):
"ZWIK_LOCK_FILE",
"SKIP_INSTALLATION_CHECK",
"JENKINS_HOME",
"CI",
"ZWIK_ENVS_PATH",
"CONDA_ENVS_PATH",
"CONDA_PKGS_DIRS",
Expand Down