Merge pull request #252135 from gador/sqlite3-to-mysql-2-0-3
python3Packages.pytimeparse2: init at 1.7.1 python3Packages.mysql-connector: 8.0.29 -> 8.0.33 sqlite3-to-mysql: 1.4.19 -> 2.0.3
This commit is contained in:
commit
32ac384ded
5 changed files with 80 additions and 68 deletions
|
@ -1,36 +1,22 @@
|
|||
From c5d32ef5d656b0aa4b2c1fc61c901d40bf2fb96a Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Ben Nasrallah <me@abn.sh>
|
||||
Date: Mon, 19 Jul 2021 17:24:41 +0200
|
||||
Subject: [PATCH] Revert "Fix MacOS wheels platform tag"
|
||||
|
||||
This reverts commit d1e89fd3d7391084cdf35b0806cb5d2a4b413654.
|
||||
---
|
||||
cpydist/__init__.py | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cpydist/__init__.py b/cpydist/__init__.py
|
||||
index 0e7f341..2619d7a 100644
|
||||
index 7fdbaf2..3c427da 100644
|
||||
--- a/cpydist/__init__.py
|
||||
+++ b/cpydist/__init__.py
|
||||
@@ -41,7 +41,7 @@ from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
from distutils.core import Command
|
||||
from distutils.dir_util import mkpath, remove_tree
|
||||
-from distutils.sysconfig import get_config_vars, get_python_version
|
||||
+from distutils.sysconfig import get_python_version
|
||||
from distutils.version import LooseVersion
|
||||
from subprocess import check_call, Popen, PIPE
|
||||
|
||||
@@ -57,9 +57,6 @@ version_py = os.path.join("lib", "mysql", "connector", "version.py")
|
||||
@@ -38,7 +38,7 @@ import tempfile
|
||||
from glob import glob
|
||||
from pathlib import Path
|
||||
from subprocess import PIPE, Popen, check_call
|
||||
-from sysconfig import get_config_vars, get_python_version
|
||||
+from sysconfig import get_python_version
|
||||
|
||||
from setuptools import Command
|
||||
from setuptools.command.build_ext import build_ext
|
||||
@@ -68,8 +68,6 @@ version_py = os.path.join("lib", "mysql", "connector", "version.py")
|
||||
with open(version_py, "rb") as fp:
|
||||
exec(compile(fp.read(), version_py, "exec"))
|
||||
|
||||
|
||||
-if "MACOSX_DEPLOYMENT_TARGET" in get_config_vars():
|
||||
- get_config_vars()["MACOSX_DEPLOYMENT_TARGET"] = "11.0"
|
||||
-
|
||||
COMMON_USER_OPTIONS = [
|
||||
("byte-code-only", None,
|
||||
"remove Python .py files; leave byte code .pyc only"),
|
||||
--
|
||||
2.31.1
|
||||
|
||||
COMMON_USER_OPTIONS = [
|
||||
(
|
|
@ -6,21 +6,30 @@
|
|||
, fetchFromGitHub
|
||||
, protobuf
|
||||
, pythonOlder
|
||||
, fetchpatch
|
||||
, mysql80
|
||||
, openssl
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mysql-connector";
|
||||
version = "8.0.29";
|
||||
version = "8.0.33";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
setupPyBuildFlags = [
|
||||
"--with-mysql-capi=\"${mysql80}\""
|
||||
"--with-openssl-include-dir=\"${openssl.dev}/include\""
|
||||
"--with-openssl-lib-dir=\"${lib.getLib openssl}/lib\""
|
||||
"-L \"${lib.getLib pkgs.zstd}/lib:${lib.getLib mysql80}/lib\""
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mysql";
|
||||
repo = "mysql-connector-python";
|
||||
rev = version;
|
||||
hash = "sha256-X0qiXNYkNoR00ESUdByPj4dPnEnjLyopm25lm1JvkAk=";
|
||||
hash = "sha256-GtMq7E2qBqFu54hjUotzPyxScTKXNdEQcmgHnS7lBhc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -30,17 +39,19 @@ buildPythonPackage rec {
|
|||
# 10.12. The patch reverts
|
||||
# https://github.com/mysql/mysql-connector-python/commit/d1e89fd3d7391084cdf35b0806cb5d2a4b413654
|
||||
./0001-Revert-Fix-MacOS-wheels-platform-tag.patch
|
||||
|
||||
# Allow for clang to be used to build native extensions
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mysql/mysql-connector-python/commit/fd24ce9dc8c60cc446a8e69458f7851d047c7831.patch";
|
||||
hash = "sha256-WvU1iB53MavCsksKCjGvUl7R3Ww/38alxxMVzjpr5Xg=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
mysql80
|
||||
];
|
||||
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dnspython
|
||||
protobuf
|
||||
mysql80
|
||||
openssl
|
||||
pkgs.zstd
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
|
32
pkgs/development/python-modules/pytimeparse2/default.nix
Normal file
32
pkgs/development/python-modules/pytimeparse2/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ lib, fetchFromGitHub, buildPythonPackage, dateutils }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytimeparse2";
|
||||
version = "1.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "onegreyonewhite";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-zWRbSohTvbVd3GcRRoxH/UReVGYHC0YmbNgbt8N0X48=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ dateutils ];
|
||||
|
||||
# custom checks, see
|
||||
# https://github.com/onegreyonewhite/pytimeparse2/blob/e00df7506b6925f2c6a5783e89e9f239d128271a/tox.ini#L36C20-L36C78
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
python tests.py -vv --failfast
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pytimeparse2" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A pytimeparse based project with the aim of optimizing functionality and providing stable support";
|
||||
homepage = "https://github.com/onegreyonewhite/pytimeparse2";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ gador ];
|
||||
};
|
||||
}
|
|
@ -1,57 +1,37 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, python3Packages
|
||||
, nixosTests
|
||||
, testers
|
||||
, sqlite3-to-mysql
|
||||
, fetchPypi
|
||||
, mysql80
|
||||
}:
|
||||
|
||||
let
|
||||
py = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
# sqlite3-to-mysql is incompatible with versions > 1.4.44 of sqlalchemy
|
||||
sqlalchemy = super.sqlalchemy.overridePythonAttrs rec {
|
||||
version = "1.4.44";
|
||||
format = "setuptools";
|
||||
src = fetchPypi {
|
||||
pname = "SQLAlchemy";
|
||||
inherit version;
|
||||
hash = "sha256-LdpflnGa6Js+wPG3lpjYbrmuyx1U6ZCrs/3ZLAS0apA=";
|
||||
};
|
||||
disabledTestPaths = [
|
||||
"test/aaa_profiling"
|
||||
"test/ext/mypy"
|
||||
];
|
||||
};
|
||||
};
|
||||
self = py;
|
||||
};
|
||||
|
||||
in
|
||||
with py.pkgs; buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "sqlite3-to-mysql";
|
||||
version = "1.4.19";
|
||||
version = "2.0.3";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = python3Packages.pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "techouse";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-gtXwDLHl5f1sXLm+b8l08bY/XJkN+zVtd7m45K0CAYY=";
|
||||
hash = "sha256-rlKJKthop9BQnqjTUq1hZM/NP69gPdEFTq1rU+CbpWA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
hatchling
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
click
|
||||
mysql-connector
|
||||
pytimeparse
|
||||
pytimeparse2
|
||||
pymysql
|
||||
pymysqlsa
|
||||
six
|
||||
simplejson
|
||||
sqlalchemy
|
||||
sqlalchemy-utils
|
||||
|
@ -59,6 +39,7 @@ with py.pkgs; buildPythonApplication rec {
|
|||
tabulate
|
||||
unidecode
|
||||
packaging
|
||||
mysql80
|
||||
];
|
||||
|
||||
# tests require a mysql server instance
|
||||
|
|
|
@ -10635,6 +10635,8 @@ self: super: with self; {
|
|||
|
||||
pytimeparse = callPackage ../development/python-modules/pytimeparse { };
|
||||
|
||||
pytimeparse2 = callPackage ../development/python-modules/pytimeparse2 { };
|
||||
|
||||
pytm = callPackage ../development/python-modules/pytm { };
|
||||
|
||||
pytmx = callPackage ../development/python-modules/pytmx { };
|
||||
|
|
Loading…
Reference in a new issue