mirror of
https://github.com/leonardw/synology-open-vm-tools.git
synced 2025-08-16 17:36:51 +00:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
--- setup.py.orig 2011-07-20 23:09:51.000000000 +0200
|
|
+++ setup.py 2011-07-20 23:10:30.000000000 +0200
|
|
@@ -40,7 +40,6 @@
|
|
from distutils.core import Extension, Command
|
|
from distutils.command.build_ext import build_ext
|
|
import os, sys
|
|
-import struct
|
|
|
|
if sys.version[0:1] == '1':
|
|
raise RuntimeError, ("The Python Cryptography Toolkit requires "
|
|
@@ -106,14 +105,6 @@
|
|
result = find_file(filename, std_dirs, paths)
|
|
return result
|
|
|
|
-def endianness_macro():
|
|
- s = struct.pack("@I", 0x33221100)
|
|
- if s == "\x00\x11\x22\x33": # little endian
|
|
- return ('PCT_LITTLE_ENDIAN', 1)
|
|
- elif s == "\x33\x22\x11\x00": # big endian
|
|
- return ('PCT_BIG_ENDIAN', 1)
|
|
- raise AssertionError("Machine is neither little-endian nor big-endian")
|
|
-
|
|
class PCTBuildExt (build_ext):
|
|
def build_extensions(self):
|
|
# Detect which modules should be compiled
|
|
@@ -276,10 +267,6 @@
|
|
Extension("Crypto.Hash.SHA256",
|
|
include_dirs=['src/'],
|
|
sources=["src/SHA256.c"]),
|
|
- Extension("Crypto.Hash.RIPEMD160",
|
|
- include_dirs=['src/'],
|
|
- sources=["src/RIPEMD160.c"],
|
|
- define_macros=[endianness_macro()]),
|
|
|
|
# Block encryption algorithms
|
|
Extension("Crypto.Cipher.AES",
|