当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
5 Star 0 Fork 5

src-openEuler / python-crypto
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-crypto-2.6.1-no-distutils.patch 2.54 KB
一键复制 编辑 原始数据 按行查看 历史
--- lib/Crypto/SelfTest/PublicKey/test_DSA.py
+++ lib/Crypto/SelfTest/PublicKey/test_DSA.py
@@ -223,7 +223,7 @@ def get_tests(config={}):
from Crypto.PublicKey import _fastmath
tests += list_test_cases(DSAFastMathTest)
except ImportError:
- from distutils.sysconfig import get_config_var
+ from sysconfig import get_config_var
import inspect
_fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
--- lib/Crypto/SelfTest/PublicKey/test_RSA.py
+++ lib/Crypto/SelfTest/PublicKey/test_RSA.py
@@ -393,7 +393,7 @@ def get_tests(config={}):
from Crypto.PublicKey import _fastmath
tests += list_test_cases(RSAFastMathTest)
except ImportError:
- from distutils.sysconfig import get_config_var
+ from sysconfig import get_config_var
import inspect
_fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
--- lib/Crypto/Util/number.py
+++ lib/Crypto/Util/number.py
@@ -41,7 +41,7 @@ except ImportError:
# see an exception raised if _fastmath exists but cannot be imported,
# uncomment the below
#
- # from distutils.sysconfig import get_config_var
+ # from sysconfig import get_config_var
# import inspect, os
# _fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
# inspect.getfile(inspect.currentframe())))
--- setup.py
+++ setup.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#
-# setup.py : Distutils setup script
+# setup.py : setuptools setup script
#
# Part of the Python Cryptography Toolkit
#
@@ -36,11 +36,10 @@
__revision__ = "$Id$"
-from distutils import core
-from distutils.ccompiler import new_compiler
-from distutils.core import Extension, Command
-from distutils.command.build import build
-from distutils.command.build_ext import build_ext
+from setuptools import setup
+from setuptools.command.build_ext import new_compiler
+from setuptools import Extension, Command
+from setuptools.command.build_ext import build_ext
import os, sys, re
import struct
@@ -53,8 +52,7 @@ if sys.version[0:1] != '3':
# .gcov files
USE_GCOV = 0
-
-from distutils.command.build_py import build_py
+from setuptools.command.build_py import build_py
# Work around the print / print() issue with Python 2.x and 3.x. We only need
# to print at one point of the code, which makes this easy
@@ -385,7 +383,7 @@ kw = {'name':"pycrypto",
]
}
-core.setup(**kw)
+setup(**kw)
def touch(path):
import os, time
1
https://gitee.com/src-openeuler/python-crypto.git
git@gitee.com:src-openeuler/python-crypto.git
src-openeuler
python-crypto
python-crypto
master

搜索帮助