s3ql: 5.2.3 -> 5.3.0 (#415908)
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Taron <philip.taron@gmail.com>
|
||||
Date: Wed, 11 Jun 2025 10:41:42 -0700
|
||||
Subject: [PATCH] setup.py: remove self-reference and DEVELOPER_MODE
|
||||
|
||||
Signed-off-by: Philip Taron <philip.taron@gmail.com>
|
||||
---
|
||||
setup.py | 33 ++-------------------------------
|
||||
1 file changed, 2 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 00f6e9b120525d63fbc17949b2804785f1286118..b5582bcc366148d9c0a442abade65a6127ef2d3c 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -26,15 +26,7 @@ from setuptools.command.test import test as TestCommand
|
||||
|
||||
faulthandler.enable()
|
||||
|
||||
-basedir = os.path.abspath(os.path.dirname(sys.argv[0]))
|
||||
-DEVELOPER_MODE = os.path.exists(os.path.join(basedir, 'MANIFEST.in'))
|
||||
-if DEVELOPER_MODE:
|
||||
- print('MANIFEST.in exists, running in developer mode')
|
||||
-
|
||||
-# Add S3QL sources
|
||||
-sys.path.insert(0, os.path.join(basedir, 'src'))
|
||||
-sys.path.insert(0, os.path.join(basedir, 'util'))
|
||||
-import s3ql
|
||||
+basedir = "/build/source"
|
||||
|
||||
|
||||
class pytest(TestCommand):
|
||||
@@ -52,27 +44,6 @@ def main():
|
||||
|
||||
compile_args = ['-Wall', '-Wextra', '-Wconversion', '-Wsign-compare']
|
||||
|
||||
- # Enable all fatal warnings only when compiling from Mercurial tip.
|
||||
- # (otherwise we break forward compatibility because compilation with newer
|
||||
- # compiler may fail if additional warnings are added)
|
||||
- if DEVELOPER_MODE:
|
||||
- if os.environ.get('CI') != 'true':
|
||||
- compile_args.append('-Werror')
|
||||
-
|
||||
- # Value-changing conversions should always be explicit.
|
||||
- compile_args.append('-Werror=conversion')
|
||||
-
|
||||
- # Note that (i > -1) is false if i is unsigned (-1 will be converted to
|
||||
- # a large positive value). We certainly don't want to do this by
|
||||
- # accident.
|
||||
- compile_args.append('-Werror=sign-compare')
|
||||
-
|
||||
- # These warnings have always been harmless, and have always been due to
|
||||
- # issues in Cython code rather than S3QL. Cython itself warns if there
|
||||
- # are unused variables in .pyx code.
|
||||
- compile_args.append('-Wno-unused-parameter')
|
||||
- compile_args.append('-Wno-unused-function')
|
||||
-
|
||||
required_pkgs = [
|
||||
'apsw >= 3.42.0', # https://github.com/rogerbinns/apsw/issues/459
|
||||
'cryptography',
|
||||
@@ -88,7 +59,7 @@ def main():
|
||||
setuptools.setup(
|
||||
name='s3ql',
|
||||
zip_safe=False,
|
||||
- version=s3ql.VERSION,
|
||||
+ version="@version@",
|
||||
description='a full-featured file system for online data storage',
|
||||
long_description=long_desc,
|
||||
author='Nikolaus Rath',
|
||||
@@ -2,28 +2,56 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
replaceVars,
|
||||
sqlite,
|
||||
which,
|
||||
nix-update-script,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
let
|
||||
inherit (python3.pkgs)
|
||||
buildPythonApplication
|
||||
setuptools
|
||||
cython
|
||||
apsw
|
||||
cryptography
|
||||
defusedxml
|
||||
google-auth
|
||||
google-auth-oauthlib
|
||||
pyfuse3
|
||||
requests
|
||||
trio
|
||||
pytest-trio
|
||||
pytestCheckHook
|
||||
python
|
||||
;
|
||||
in
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "s3ql";
|
||||
version = "5.2.3";
|
||||
version = "5.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "s3ql";
|
||||
repo = "s3ql";
|
||||
tag = "s3ql-${version}";
|
||||
hash = "sha256-hNqKLpJd0vj96Jx4YnqYsPLq/iTbvmtvjyLrYozaxpk=";
|
||||
hash = "sha256-SVB+VB508hGXvdHZo5lt09yssjjwHS1tsDU8M4j+swc=";
|
||||
};
|
||||
|
||||
build-system = with python3.pkgs; [ setuptools ];
|
||||
patches = [
|
||||
(replaceVars ./0001-setup.py-remove-self-reference.patch { inherit version; })
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ which ] ++ (with python3.pkgs; [ cython ]);
|
||||
build-system = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
nativeBuildInputs = [
|
||||
which
|
||||
cython
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
apsw
|
||||
cryptography
|
||||
defusedxml
|
||||
@@ -35,23 +63,23 @@ python3.pkgs.buildPythonApplication rec {
|
||||
trio
|
||||
];
|
||||
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
nativeCheckInputs = [
|
||||
pytest-trio
|
||||
pytestCheckHook
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
${python3.pkgs.python.pythonOnBuildForHost.interpreter} ./setup.py build_cython build_ext --inplace
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
${python.pythonOnBuildForHost.interpreter} ./setup.py build_cython build_ext --inplace
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "s3ql" ];
|
||||
|
||||
pytestFlagsArray = [ "tests/" ];
|
||||
|
||||
# SSL EOF error doesn't match connection reset error. Seems fine.
|
||||
disabledTests = [ "test_aborted_write2" ];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
|
||||
Reference in New Issue
Block a user