cckuailong / py2sec

:snake: py2sec is a Cross-Platform, Fast and Flexible tool to change the .py to .so(Linux and Mac) or .pyd(Win).
MIT License
488 stars 112 forks source link

Py2Sec Encrypt Encounter Error #20

Open XZ1314XZ opened 12 months ago

XZ1314XZ commented 12 months ago

Environment: Python==3.11.4 Cython==3.0.5

Command:python py2sec.py -f example/test1.py -r Error message:

Compiling example/test1.py because it changed.
[1/1] Cythonizing example/test1.py

Error compiling Cython file:
------------------------------------------------------------
...
print(1)
^
------------------------------------------------------------

example\test1.py:1:0: 'example/test1' is not a valid module name
Traceback (most recent call last):
  File "E:\DevProject\PythonProject\LIBRARY\py2sec\tmp_py2sec_build.py", line 28, in <module>
    ext_modules = cythonize(extentions, nthreads=1, build_dir="tmp_build", quiet=False, compiler_directives=compiler_directives)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\MiniConda\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "D:\MiniConda\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: example/test1.py

Py2Sec Encrypt Encounter Error