Skip to content

Commit 09c3d7c

Browse files
authored
skypilot: 0.8.1 -> 0.12.0 (#511582)
2 parents ff89d9e + be48fe6 commit 09c3d7c

4 files changed

Lines changed: 318 additions & 32 deletions

File tree

Lines changed: 228 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,240 @@
11
{
22
lib,
3+
pkgs,
34
fetchFromGitHub,
45
python3Packages,
6+
buildNpmPackage,
7+
writableTmpDirAsHomeHook,
58
}:
6-
7-
python3Packages.buildPythonApplication (finalAttrs: {
9+
let
810
pname = "skypilot";
9-
version = "0.8.1";
11+
version = "0.12.0";
1012

1113
src = fetchFromGitHub {
1214
owner = "skypilot-org";
1315
repo = "skypilot";
14-
tag = "v${finalAttrs.version}";
15-
hash = "sha256-jLjYsBkb5Tba3q/mdqCWK04FLg0pEdHyZH3vuMIP6tg=";
16+
tag = "v${version}";
17+
hash = "sha256-zxkduComvFuSbWnWSw1PYalGdVhiwCIjElXEg7VPw88=";
18+
};
19+
20+
dashboard = buildNpmPackage {
21+
inherit pname version src;
22+
23+
sourceRoot = "${src.name}/sky/dashboard";
24+
npmDepsHash = "sha256-8uZzkDJkaDPFXXsGy29jkaw6g8bPe3drbboYHHa6YuU=";
25+
26+
installPhase = ''
27+
mkdir -p $out
28+
cp -r out/* $out/
29+
'';
1630
};
31+
in
32+
python3Packages.buildPythonApplication (finalAttrs: {
33+
inherit pname version src;
1734

1835
pyproject = true;
36+
pythonRelaxDeps = true;
37+
38+
nativeBuildInputs = [
39+
writableTmpDirAsHomeHook
40+
];
41+
42+
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
43+
44+
postPatch = ''
45+
substituteInPlace sky/setup_files/dependencies.py --replace-fail 'casbin' 'pycasbin'
46+
substituteInPlace pyproject.toml --replace-fail 'buildkite-test-collector' ""
47+
'';
48+
49+
build-system = with python3Packages; [
50+
setuptools
51+
setuptools-scm
52+
];
53+
54+
# https://github.com/skypilot-org/skypilot/blob/master/sky/setup_files/dependencies.py
55+
dependencies =
56+
with python3Packages;
57+
[
58+
aiohttp
59+
aiofiles
60+
aiosqlite
61+
alembic
62+
asyncpg
63+
bcrypt
64+
cachetools
65+
click
66+
colorama
67+
cryptography
68+
filelock
69+
fastapi
70+
gitpython
71+
httpx
72+
ijson
73+
jinja2
74+
jsonschema
75+
networkx
76+
packaging
77+
pandas
78+
paramiko
79+
passlib
80+
pendulum
81+
pip
82+
prettytable
83+
prometheus-client
84+
psutil
85+
psycopg2-binary
86+
pycasbin
87+
pydantic
88+
pyjwt
89+
python-dotenv
90+
pyyaml
91+
python-multipart
92+
pulp
93+
requests
94+
rich
95+
setproctitle
96+
sqlalchemy
97+
sqlalchemy-adapter
98+
tabulate
99+
types-paramiko
100+
typing-extensions
101+
uvicorn
102+
wheel
103+
]
104+
++ aiohttp.optional-dependencies.speedups
105+
++ fastapi.optional-dependencies.all
106+
++ uvicorn.optional-dependencies.standard;
107+
108+
optional-dependencies =
109+
with python3Packages;
110+
lib.fix (self: {
111+
112+
all = with self; [
113+
aws
114+
azure
115+
cloudfare
116+
docker
117+
fluidstack
118+
gcp
119+
ibm
120+
kubernates
121+
lambda
122+
paperspace
123+
ray
124+
remote
125+
server
126+
scp
127+
ssh
128+
vsphere
129+
];
130+
131+
aws = [
132+
awscli
133+
boto3
134+
botocore
135+
colorama
136+
];
137+
138+
azure = [
139+
azure-cli
140+
azure-core
141+
azure-identity
142+
azure-mgmt-compute
143+
azure-mgmt-network
144+
azure-storage-blob
145+
msgraph-sdk
146+
]
147+
++ self.ray;
148+
149+
cloudfare = self.aws;
150+
151+
# cudo = [cudo-compute];
152+
#
153+
# do = [pydo azure-core azure-common];
154+
155+
docker = [ docker ];
156+
157+
fluidstack = [ ];
158+
159+
gcp = [
160+
google-api-python-client
161+
google-cloud-storage
162+
pyopenssl
163+
];
164+
165+
ibm = [
166+
ibm-cloud-sdk-core
167+
# ibm-cos-sdk
168+
# ibm-platform-services
169+
# ibm-vpc
170+
]
171+
++ self.ray;
172+
173+
kubernetes = [
174+
kubernetes
175+
websockets
176+
];
177+
178+
lambda = [ ];
179+
180+
# nebius = [
181+
# nebius
182+
# ]
183+
# ++ self.aws;
184+
185+
paperspace = [ ];
186+
187+
ray = [ ray ] ++ ray.optional-dependencies.default;
188+
189+
remote = [
190+
grpcio
191+
protobuf
192+
];
193+
194+
# runpod = [ runpod ];
195+
196+
server = [
197+
pycasbin
198+
passlib
199+
pyjwt
200+
sqlalchemy-adapter
201+
];
202+
203+
scp = self.ray;
204+
205+
ssh = self.kubernetes;
206+
207+
# vast = [vastai-sdk];
208+
209+
vsphere = [
210+
pyvmomi
211+
# vsphere-automation-sdk
212+
];
213+
});
214+
215+
postInstall = ''
216+
mkdir -p $out/${python3Packages.python.sitePackages}/sky/dashboard/out
217+
cp -r ${dashboard}/* $out/${python3Packages.python.sitePackages}/sky/dashboard/out/
218+
'';
219+
220+
# Excluding the tests as it fails with error:
221+
# Message: 'Config loaded from /build/source/examples/admin_policy/restful_policy.yaml:\nadmin_policy: http://localhost:8080\n'
222+
#Arguments: ()
223+
#--- Logging error ---
224+
#Traceback (most recent call last):
225+
# File "/nix/store/pzdalg368npikvpq4ncz2saxnz19v53k-python3-3.13.12/lib/python3.13/logging/__init__.py", line 1154, in emit
226+
# stream.write(msg + self.terminator)
227+
# ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
228+
#ValueError: I/O operation on closed file.
229+
# nativeCheckInputs = with python3Packages; [
230+
# pytestCheckHook
231+
# boto3
232+
# pytest-env
233+
# pytest-xdist
234+
# ];
19235

20-
build-system = with python3Packages; [ setuptools ];
21-
22-
# when updating, please ensure package version constraints stipulaed
23-
# in setup.py are met
24-
propagatedBuildInputs = with python3Packages; [
25-
cachetools
26-
click
27-
colorama
28-
cryptography
29-
filelock
30-
jinja2
31-
jsonschema
32-
networkx
33-
packaging
34-
pandas
35-
pendulum
36-
prettytable
37-
psutil
38-
python-dotenv
39-
pyyaml
40-
pulp
41-
requests
42-
rich
43-
tabulate
44-
typing-extensions
45-
wheel
236+
pythonImportsCheck = [
237+
"sky"
46238
];
47239

48240
meta = {
@@ -53,8 +245,12 @@ python3Packages.buildPythonApplication (finalAttrs: {
53245
managed execution.
54246
'';
55247
homepage = "https://github.com/skypilot-org/skypilot";
248+
changelog = "https://github.com/skypilot-org/skypilot/releases/tag/${finalAttrs.src.tag}";
56249
license = lib.licenses.asl20;
57-
maintainers = with lib.maintainers; [ seanrmurphy ];
250+
maintainers = with lib.maintainers; [
251+
seanrmurphy
252+
daspk04
253+
];
58254
mainProgram = "sky";
59255
};
60256
})
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
buildPythonPackage,
5+
6+
pycasbin,
7+
sqlalchemy,
8+
setuptools,
9+
10+
pytestCheckHook,
11+
}:
12+
buildPythonPackage (finalAttrs: {
13+
pname = "sqlalchemy-adapter";
14+
version = "1.9.0";
15+
pyproject = true;
16+
__structuredAttrs = true;
17+
18+
src = fetchFromGitHub {
19+
owner = "officialpycasbin";
20+
repo = "sqlalchemy-adapter";
21+
tag = "v${finalAttrs.version}";
22+
hash = "sha256-FjxRSJ+3IIdtKkpZvkL/KzH7gn4IJjCTchABglfcyQ4=";
23+
};
24+
25+
build-system = [
26+
setuptools
27+
];
28+
29+
dependencies = [
30+
pycasbin
31+
sqlalchemy
32+
];
33+
34+
pythonImportsCheck = [
35+
"sqlalchemy_adapter"
36+
];
37+
38+
nativeCheckInputs = [
39+
pytestCheckHook
40+
];
41+
42+
meta = {
43+
description = "SQLAlchemy Adapter for PyCasbin";
44+
homepage = "https://github.com/officialpycasbin/sqlalchemy-adapter";
45+
changelog = "https://github.com/apache/casbin-python-sqlalchemy-adapter/blob/${finalAttrs.src.tag}/CHANGELOG.md";
46+
license = lib.licenses.asl20;
47+
maintainers = with lib.maintainers; [ daspk04 ];
48+
};
49+
})
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
setuptools,
6+
cryptography,
7+
}:
8+
buildPythonPackage (finalAttrs: {
9+
pname = "types-paramiko";
10+
version = "4.0.0.20250822";
11+
pyproject = true;
12+
__structuredAttrs = true;
13+
14+
src = fetchPypi {
15+
pname = "types_paramiko";
16+
inherit (finalAttrs) version;
17+
hash = "sha256-G1awy9Puw9L9EjyesnBOYSt3fhWhdwWoBCeeplJeDFM=";
18+
};
19+
20+
build-system = [ setuptools ];
21+
22+
dependencies = [
23+
cryptography
24+
];
25+
26+
# Modules doesn't have tests
27+
doCheck = false;
28+
29+
pythonImportsCheck = [ "paramiko-stubs" ];
30+
31+
meta = {
32+
description = "Typing stubs for paramiko";
33+
homepage = "https://github.com/python/typeshed";
34+
license = lib.licenses.asl20;
35+
maintainers = with lib.maintainers; [ daspk04 ];
36+
};
37+
})

pkgs/top-level/python-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18428,6 +18428,8 @@ self: super: with self; {
1842818428

1842918429
sqlalchemy = callPackage ../development/python-modules/sqlalchemy { };
1843018430

18431+
sqlalchemy-adapter = callPackage ../development/python-modules/sqlalchemy-adapter { };
18432+
1843118433
sqlalchemy-citext = callPackage ../development/python-modules/sqlalchemy-citext { };
1843218434

1843318435
sqlalchemy-cockroachdb = callPackage ../development/python-modules/sqlalchemy-cockroachdb { };
@@ -20391,6 +20393,8 @@ self: super: with self; {
2039120393

2039220394
types-openpyxl = callPackage ../development/python-modules/types-openpyxl { };
2039320395

20396+
types-paramiko = callPackage ../development/python-modules/types-paramiko { };
20397+
2039420398
types-pillow = callPackage ../development/python-modules/types-pillow { };
2039520399

2039620400
types-protobuf = callPackage ../development/python-modules/types-protobuf { };

0 commit comments

Comments
 (0)