Browse Source

move secp256k1 extension module to proto.secp256k1

The MMGen Project 2 years ago
parent
commit
d646099a37
4 changed files with 5 additions and 5 deletions
  1. 2 2
      mmgen/proto/secp256k1/keygen.py
  2. 1 1
      setup.py
  3. 1 1
      test/overlay/__init__.py
  4. 1 1
      test/unit_tests_d/ut_dep.py

+ 2 - 2
mmgen/proto/secp256k1/keygen.py

@@ -20,7 +20,7 @@ class backend:
 	class libsecp256k1(keygen_base):
 
 		def __init__(self):
-			from ...secp256k1 import priv2pub
+			from .secp256k1 import priv2pub
 			self.priv2pub = priv2pub
 
 		def to_pubkey(self,privkey):
@@ -31,7 +31,7 @@ class backend:
 		@classmethod
 		def test_avail(cls,silent=False):
 			try:
-				from ...secp256k1 import priv2pub
+				from .secp256k1 import priv2pub
 				if not priv2pub(bytes.fromhex('deadbeef'*8),1):
 					from ...util import die
 					die( 'ExtensionModuleError',

+ 1 - 1
setup.py

@@ -46,7 +46,7 @@ class my_build_ext(build_ext):
 setup(
 	cmdclass = { 'build_ext': my_build_ext },
 	ext_modules = [Extension(
-		name          = 'mmgen.secp256k1',
+		name          = 'mmgen.proto.secp256k1.secp256k1',
 		sources       = ['extmod/secp256k1mod.c'],
 		libraries     = ([],['gmp'])[have_msys2],
 		extra_objects = [os.path.join(ext_path,'.libs/libsecp256k1.a')],

+ 1 - 1
test/overlay/__init__.py

@@ -15,7 +15,7 @@ def overlay_setup(repo_root):
 			if (
 				fn.endswith('.py') or
 				d == 'mmgen.data' or
-				d == 'mmgen' and fn.startswith('secp256k1')
+				d == 'mmgen.proto.secp256k1' and fn.startswith('secp256k1')
 			):
 				if os.path.exists(os.path.join(fakemod_dir,fn)):
 					make_link(

+ 1 - 1
test/unit_tests_d/ut_dep.py

@@ -51,7 +51,7 @@ class unit_tests:
 		return False
 
 	def secp256k1(self,name,ut):
-		from mmgen.secp256k1 import priv2pub
+		from mmgen.proto.secp256k1.secp256k1 import priv2pub
 		priv2pub(bytes.fromhex('deadbeef'*8),1)
 		return True