move all packages into src/, fix allmydata.Crypto build. Now you must perform a 'setup.py build' before using anything, and you must add the build directory (build/lib.linux-i686-2.4) to your PYTHONPATH before doing anything

This commit is contained in:
Brian Warner 2006-12-14 03:39:50 -07:00
parent f9828846d5
commit 3490378551
118 changed files with 33 additions and 32 deletions

View File

@ -17,11 +17,11 @@ if sys.platform == 'win32':
plat_ext = [
Extension("Crypto.Util.winrandom",
libraries = HTONS_LIBS + ['advapi32'],
include_dirs=['Crypto/src/'],
include_dirs=['src/Crypto/src/'],
extra_compile_args=['-O0 -g',],
extra_link_args=['-g',],
undef_macros=['NDEBUG',],
sources=["Crypto/src/winrand.c"],
sources=["src/Crypto/src/winrand.c"],
**debug_build_kw)
]
else:
@ -81,48 +81,48 @@ class PCTBuildExt (build_ext):
self.extensions += [
# Hash functions
Extension("allmydata.Crypto.Hash.MD4",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/MD4.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/MD4.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Hash.SHA256",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/SHA256.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/SHA256.c"],
**debug_build_kw),
# Block encryption algorithms
Extension("allmydata.Crypto.Cipher.AES",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/AES.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/AES.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Cipher.ARC2",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/ARC2.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/ARC2.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Cipher.Blowfish",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/Blowfish.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/Blowfish.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Cipher.CAST",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/CAST.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/CAST.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Cipher.DES",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/DES.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/DES.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Cipher.DES3",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/DES3.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/DES3.c"],
**debug_build_kw),
# Stream ciphers
Extension("allmydata.Crypto.Cipher.ARC4",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/ARC4.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/ARC4.c"],
**debug_build_kw),
Extension("allmydata.Crypto.Cipher.XOR",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/XOR.c"],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/XOR.c"],
**debug_build_kw),
]
@ -140,9 +140,9 @@ class PCTBuildExt (build_ext):
exts = []
if (self.compiler.find_library_file(lib_dirs, 'gmp')):
exts.append(Extension("allmydata.Crypto.PublicKey._fastmath",
include_dirs=['Crypto/src/'],
include_dirs=['src/Crypto/src/'],
libraries=['gmp'],
sources=["Crypto/src/_fastmath.c"]))
sources=["src/Crypto/src/_fastmath.c"]))
self.extensions += exts
@ -183,13 +183,14 @@ setup(
name="AllMyData",
version="0.0.1",
#packages=find_packages('.'),
packages=["allmydata", "allmydata/test", "allmydata/util",
"allmydata/scripts",
packages=["allmydata", "allmydata.test", "allmydata.util",
"allmydata.scripts",
"allmydata.Crypto", "allmydata.Crypto.Hash",
"allmydata.Crypto.Cipher", "allmydata.Crypto.Util",
"allmydata.Crypto.Protocol", "allmydata.Crypto.PublicKey"
],
package_dir={ "allmydata.Crypto": "Crypto" },
package_dir={ "allmydata": "src/allmydata",
"allmydata.Crypto": "src/Crypto" },
scripts = ["bin/allmydata"],
package_data={ 'allmydata': ['web/*.xhtml'] },
@ -197,8 +198,8 @@ setup(
# One module is defined here, because build_ext won't be
# called unless there's at least one extension module defined.
ext_modules=[Extension("allmydata.Crypto.Hash.MD2",
include_dirs=['Crypto/src/'],
sources=["Crypto/src/MD2.c"])],
include_dirs=['src/Crypto/src/'],
sources=["src/Crypto/src/MD2.c"])],
description="AllMyData (tahoe2)",
)

View File

@ -732,7 +732,7 @@ _MODULE_NAME (void)
ALGtype.ob_type = &PyType_Type;
/* Create the module and add the functions */
m = Py_InitModule("Crypto.Cipher." _MODULE_STRING, modulemethods);
m = Py_InitModule("allmydata.Crypto.Cipher." _MODULE_STRING, modulemethods);
PyModule_AddIntConstant(m, "MODE_ECB", MODE_ECB);
PyModule_AddIntConstant(m, "MODE_CBC", MODE_CBC);

View File

@ -236,7 +236,7 @@ _MODULE_NAME (void)
PyObject *m;
ALGtype.ob_type = &PyType_Type;
m = Py_InitModule("Crypto.Hash." _MODULE_STRING, ALG_functions);
m = Py_InitModule("allmydata.Crypto.Hash." _MODULE_STRING, ALG_functions);
/* Add some symbolic constants to the module */
PyModule_AddIntConstant(m, "digest_size", DIGEST_SIZE);

View File

@ -232,7 +232,7 @@ _MODULE_NAME (void)
ALGtype.ob_type = &PyType_Type;
/* Create the module and add the functions */
m = Py_InitModule("Crypto.Cipher." _MODULE_STRING, modulemethods);
m = Py_InitModule("allmydata.Crypto.Cipher." _MODULE_STRING, modulemethods);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);

Some files were not shown because too many files have changed in this diff Show More