Skip to content

Commit 6494910

Browse files
authored
snapcraft: 8.6.1 -> 8.7.0 (#382798)
2 parents 403296f + 11c21de commit 6494910

File tree

2 files changed

+11
-29
lines changed

2 files changed

+11
-29
lines changed

pkgs/by-name/sn/snapcraft/package.nix

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
python3Packages.buildPythonApplication rec {
1515
pname = "snapcraft";
16-
version = "8.6.1";
16+
version = "8.7.0";
1717

1818
pyproject = true;
1919

2020
src = fetchFromGitHub {
2121
owner = "canonical";
2222
repo = "snapcraft";
2323
tag = version;
24-
hash = "sha256-SbxsgvDptkUl8gHAIrJvnzIPOh0/R81n8cgJWBH7BXQ=";
24+
hash = "sha256-AFqCIqU3XAITrnRp0VzFzvW1LGSJPTFS6VWSR3qF1Pc=";
2525
};
2626

2727
patches = [
@@ -43,15 +43,7 @@ python3Packages.buildPythonApplication rec {
4343
];
4444

4545
postPatch = ''
46-
substituteInPlace setup.py \
47-
--replace-fail 'version=determine_version()' 'version="${version}"' \
48-
--replace-fail 'gnupg' 'python-gnupg'
49-
50-
substituteInPlace requirements.txt \
51-
--replace-fail 'gnupg==2.3.1' 'python-gnupg'
52-
53-
substituteInPlace snapcraft/__init__.py \
54-
--replace-fail '__version__ = _get_version()' '__version__ = "${version}"'
46+
substituteInPlace snapcraft/__init__.py --replace-fail "dev" "${version}"
5547
5648
substituteInPlace snapcraft_legacy/__init__.py \
5749
--replace-fail '__version__ = _get_version()' '__version__ = "${version}"'
@@ -60,8 +52,7 @@ python3Packages.buildPythonApplication rec {
6052
--replace-fail 'arch_linker_path = Path(arch_config.dynamic_linker)' \
6153
'return str(Path("${glibc}/lib/ld-linux-x86-64.so.2"))'
6254
63-
substituteInPlace pyproject.toml \
64-
--replace-fail '"pytest-cov>=4.0",' ""
55+
substituteInPlace pyproject.toml --replace-fail 'gnupg' 'python-gnupg'
6556
'';
6657

6758
nativeBuildInputs = [ makeWrapper ];
@@ -110,10 +101,11 @@ python3Packages.buildPythonApplication rec {
110101
validators
111102
];
112103

113-
build-system = with python3Packages; [ setuptools ];
104+
build-system = with python3Packages; [ setuptools-scm ];
114105

115106
pythonRelaxDeps = [
116107
"craft-parts"
108+
"cryptography"
117109
"docutils"
118110
"jsonschema"
119111
"pygit2"
Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
diff --git a/snapcraft_legacy/internal/common.py b/snapcraft_legacy/internal/common.py
2-
index 6017b405..aacd99a5 100644
2+
index b3d40c265..c68c24d53 100644
33
--- a/snapcraft_legacy/internal/common.py
44
+++ b/snapcraft_legacy/internal/common.py
5-
@@ -34,14 +34,17 @@ from snaphelpers import SnapConfigOptions, SnapCtlError
5+
@@ -36,7 +36,10 @@ from snapcraft_legacy.internal import errors
66

7-
from snapcraft_legacy.internal import errors
7+
SNAPCRAFT_FILES = ["parts", "stage", "prime"]
88

9+
-_DEFAULT_PLUGINDIR = os.path.join(sys.prefix, "share", "snapcraft", "plugins")
910
+# Get the path to the Nix store entry for Snapcraft at runtime
1011
+drv = os.path.realpath(__file__).split("/")[3]
1112
+
12-
SNAPCRAFT_FILES = ["parts", "stage", "prime"]
13-
-_DEFAULT_PLUGINDIR = os.path.join(sys.prefix, "share", "snapcraft", "plugins")
1413
+_DEFAULT_PLUGINDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "plugins")
1514
_plugindir = _DEFAULT_PLUGINDIR
16-
-_DEFAULT_SCHEMADIR = os.path.join(sys.prefix, "share", "snapcraft", "schema")
17-
+_DEFAULT_SCHEMADIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "schema")
18-
_schemadir = _DEFAULT_SCHEMADIR
19-
-_DEFAULT_EXTENSIONSDIR = os.path.join(sys.prefix, "share", "snapcraft", "extensions")
20-
+_DEFAULT_EXTENSIONSDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "extensions")
21-
_extensionsdir = _DEFAULT_EXTENSIONSDIR
22-
-_DEFAULT_KEYRINGSDIR = os.path.join(sys.prefix, "share", "snapcraft", "keyrings")
23-
+_DEFAULT_KEYRINGSDIR = os.path.join(os.sep, "nix", "store", drv, "share", "snapcraft", "keyrings")
24-
_keyringsdir = _DEFAULT_KEYRINGSDIR
2515

26-
_DOCKERENV_FILE = "/.dockerenv"
16+
_BASE_DIR = Path(__file__).parents[2]

0 commit comments

Comments
 (0)