Giter Club home page Giter Club logo

pyconcrete's People

Contributors

asottile avatar dependabot[bot] avatar dmvass avatar falldog avatar fangchih avatar hamada2029 avatar lapian92 avatar leonardoobaptistaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyconcrete's Issues

Calling just pyconcrete-admin should have a more friendly error message

Calling just pyconcrete-admin should have a more friendly error message:

$ pyconcrete-admin.py
Traceback (most recent call last):
  File "/home/jobevers/.virtualenvs/pd/bin/pyconcrete-admin.py", line 208, in <module>
    admin = PyConcreteAdmin()
  File "/home/jobevers/.virtualenvs/pd/bin/pyconcrete-admin.py", line 40, in __init__
    self.parse_arg()
  File "/home/jobevers/.virtualenvs/pd/bin/pyconcrete-admin.py", line 80, in parse_arg
    args.func(args)
AttributeError: 'Namespace' object has no attribute 'func'

ImportError: /lib64/tls/libc.so.6: version `GLIBC_2.14' not found

Traceback (most recent call last):
File "", line 1, in
File "/home/liuchi02/.jumbo/lib/python2.7/site-packages/pyconcrete/init.py", line 29, in
from . import _pyconcrete
ImportError: /lib64/tls/libc.so.6: version `GLIBC_2.14' not found (required by /home/liuchi02/.jumbo/lib/python2.7/site-packages/pyconcrete/_pyconcrete.so)

ValueError: bad marshal data (unknown type code)

hi ,
Running pyconcrete files gives me the following error "ValueError: bad marshal data (unknown type code)"

I am using Mac machine .

I have compiles script with following code:
pyconcrete-admin.py compile --source=main.py --pye

and running the file with
pyconcrete main.pye

I'm using python (Python 2.7.15)

I have installed pyconcrete with setup.py.

Add support for multiple sources

It looks like it is pretty easy to add support for multiple compile sources. Change argument parser and loop over sources with same logic as it is right now in compile function. If you want I can try to make pull request.

Support for Python zipapp module

zipapp makes multiple Python files as a bundle to be easy distributed. However when the pye file is bundled into the zipapp, it can't be found. Here is a minimal demo:

$ cat add_cols/app.py
import pyconcrete
import sys
from mylib import add2col

def main():
    inp = sys.argv[1]
    out = sys.argv[2]
    print(f'read file {inp}, and convert to file {out}')
    add2col(inp, out)

if __name__ == '__main__':
    main()

$ cat add_cols/mylib.py
import pandas as pd

def add2col(inpfile: str, outfile: str):
    inp = pd.read_csv(inpfile)
    inp['cola'] = inp['colb'] + inp['cola']
    inp.to_csv(outfile, index=False)

$ cat demo.csv
cola,colb
1,2
1,2
1,2
1,2

## run the plain Python file version:
$ python -m zipapp add_cols -m 'app:main'   # create a zipapp with plain Python file
$ python add_cols.pyz demo.csv res.csv   # the result file 'res.csv' is created properly

## replace mylib.py with encrypted version and run again:
$ cd add_cols
$ pyconcrete-admin.py compile --source=mylib.py --pye
$ rm mylib.py
$ cd ..
$ python -m zipapp add_cols -m 'app:main'   # create a encrypted version zipapp
$ python add_cols.pyz demo.csv res.csv       # run again
Traceback (most recent call last):
  File "/opt/app/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/app/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "add_cols.pyz/__main__.py", line 2, in <module>
  File "add_cols.pyz/app.py", line 3, in <module>
ModuleNotFoundError: No module named 'mylib'

Environment:

  • Python 3.6
  • Ubuntu 16.04

I have no experience in C/C++, and can not make more debuggings.

Thanks for help.

What is the best option to make a project portable with pyconcrete?

Hi, I am currently looking at the many options to protect my source code from being "easy" to reverse engineer.

I have some experience with pyinstaller, which can be really helpful to manage and simplify the packaging of many modules that I use, so I can quickly send a zipped folder to my customers, who usually have no programming knowledge of any kind.

Is there an option, or a hack / work-around to get pyconcrete to work as a stand-alone, without having Python installed on the computer?

marshal.loads

    code = marshal.loads(data[magic:])
    m = self.new_module(fullname, self.full_path, self.pkg_path)
    sys.modules[fullname] = m
    exec(code, m.__dict__)

这个存成pyc还是能反编译吧

Compatibility with `imp.find_module` for celery

First, thanks for the great library!

I added celery to the example project you had, and celery's autodiscover_tasks failed to discover my celery tasks.pye files.

Turns out that celery uses the builtin imp package to check if tasks.py exists in all django apps, at app/tasks.py. In particular, it uses imp.find_module() described here https://docs.python.org/2/library/imp.html#imp.find_module

Sadly, imp.find_module doesn't find .pye files, such as tasks.pye.

Celery code: https://github.com/celery/celery/blob/120770929f4a37c5373a378b75b5c41a99702af9/celery/utils/imports.py#L90

My workaround was to use pyconcrete-admin.py ... -i tasks.py and have tasks.py simply star import an encrypted module (as no one will try to find that one ;) ).

Again, no pressure, but it will be great if we could have a hook for that library as well.

I'm just signaling this here, with a keyword Celery in case anyone else tumbles on this issues.

Extra security precaution suggestion

Hi,

Thx for your effort.

I have two question/suggestion:

1 - My main python includes some other python modules so I wonder can we also compile other modules which is included by main module so it can safely use it ?

2 - Can we change the extansion .pye to something else ? its also another protection . So viewer not understand at first place the pyconcrete is used ?

Best

Pyconcrete for Reusable Django Apps

Hi it's possible to use it for reusable apps?
I followed this guide https://docs.djangoproject.com/en/2.2/intro/reusable-apps/

Everything works fine and I've built pip packages. I want to protect my code so I've installed pyconcrete in main project and executed 'pyconcrete-admin compile etc'.
It works and gave me pye files so I tried 'pyconcrete-admin release' and pyconcrete created a tar.gz packag. But if I extract the code is in clear. How can I encrypt this code?

Running pyconcrete in Electron.

I am trying to use Electron as a GUI to run python scripts inside as child-processes.

Would it be possible to encrypt all .py files to .pye then run it in Electron?

Since .pye file has to be executed by pyconcrete.exe, I am guessing that I have to include pyconcrete.exe and run the codes when the process starts.

I am trying to distribute Electron apps to the users who have no Python installed.

But then I have to compile python codes with PyInstaller, which doesn't seem to be possible with .pye files.

Is there any way to accomplish both pyconcrete encryption and making the codes executable in Electron?

Deploy code

I did successfully encrypt in my development laptop but how will deploy my encrypted code to other laptop/pc?

What I tried so far is install the pyconcrete in the other pc/laptop but its asking me again the passphrase which it will defeat the purpose.

Python 3 ?

Pyconcrete is can't working with python 3.

Issue at runtime - SyntaxError Non-ASCII character in line 1 of main.pye file

Installation and compilation worked with no errors.

pyconcrete-admin.py compile --source=main.py --pye

At runtime I get this error

main.pye -p 0.5 -n 0.5 -d 0
SyntaxError: Non-ASCII character \xf7 in file main.pye on line 1...

The main.py file has the encoding defined as UTF-8 and has no non-ascii characters.
I'm using python 3.5, OS is Raspbian.

--egg option will be removed in pip-10.0.0b2

when you install pyconcrete using pip==9.0.3:
$ pip install pyconcrete --egg --install-option="--passphrase=<your passphrase>"

this warning is showed on the console

DEPRECATION: --egg has been deprecated and will be removed in the future. This flag is mutually exclusive with large parts of pip, and actually using it invalidates pip's ability to manage the installation process.

I can't install pyconcrete using pip-10.0.0b2. I get this error:

pip 10.0.0b2 from /var/lib/jenkins/workspace/neo-assets-api-encrypted-ubuntu1604/.venv/local/lib/python2.7/site-packages/pip (python 2.7)

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --egg

Global variable issue

I have definition in the beginning of my python code :


RESET = "\033[0;0m"
RED   = "\033[1;31m"
BLUE  = "\033[1;34m"
CYAN  = "\033[1;36m"
GREEN = "\033[0;32m"
BOLD    = "\033[;1m"
REVERSE = "\033[;7m"

and in my of my function :


def on_connect(client, userdata, flags, rc):
    print(RED ,"** Kozmos bizimle ** Connected flags" + str(flags) + "result code " \
                 + str(rc) + "client1_id " , RESET)

I compiled with

pyconcrete-admin.py compile --source=_mqt_p.py --pye

and when I run ti gives :

log: Caught exception in on_connect: name 'RED' is not defined

any idea ?

_pyconcrete.pyd location?

Could you please tell me the location of key information stored? If it locates on same machine, would it be possible for someone to look over and be able to decrypt the code?

Suggest to apply cython

    def load_module(self, fullname):
        if fullname in sys.modules:  # skip reload by now ...
            return sys.modules[fullname]

        data = decrypt_buffer(self.data)  # decrypt pye
        print('----------------------------')
        print(data)   #### plaintext
        print('-------------------------------')

Since result of decrypt_buffer is plain, we can reverse the whole source code?

windows anaconda4.4+python3.6 +vs2015 compile error?

c:\programdata\anaconda3\include\pytime.h(151): error C2061: 语法错误: 标识符“_PyTime_GetMonotonicClock”
c:\programdata\anaconda3\include\pytime.h(151): error C2059: 语法错误:“;”
c:\programdata\anaconda3\include\pytime.h(151): error C2059: 语法错误:“”
c:\programdata\anaconda3\include\pytime.h(167): error C2143: 语法错误: 缺少“)”(在“”的前面)
c:\programdata\anaconda3\include\pytime.h(167): error C2143: 语法错误: 缺少“{”(在“
”的前面)
c:\programdata\anaconda3\include\pytime.h(168): error C2371: “_Py_clock_info_t”: 重定义;不同的基类型
c:\programdata\anaconda3\include\pytime.h(160): note: 参见“_Py_clock_info_t”的声明
c:\programdata\anaconda3\include\pytime.h(168): error C2143: 语法错误: 缺少“;”(在“”的前面)
c:\programdata\anaconda3\include\pytime.h(168): error C2059: 语法错误:“)”
c:\programdata\anaconda3\include\pytime.h(179): error C2143: 语法错误: 缺少“)”(在“
”的前面)
c:\programdata\anaconda3\include\pytime.h(179): error C2143: 语法错误: 缺少“{”(在“”的前面)
c:\programdata\anaconda3\include\pytime.h(180): error C2371: “_Py_clock_info_t”: 重定义;不同的基类型
c:\programdata\anaconda3\include\pytime.h(160): note: 参见“_Py_clock_info_t”的声明
c:\programdata\anaconda3\include\pytime.h(180): error C2143: 语法错误: 缺少“;”(在“
”的前面)
c:\programdata\anaconda3\include\pytime.h(180): error C2059: 语法错误:“)”
c:\programdata\anaconda3\include\pyhash.h(64): error C2061: 语法错误: 标识符“uint64_t”
c:\programdata\anaconda3\include\pyhash.h(64): fatal error C1003: 错误计数超过 100;正在停止编译
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

how to solve? thx

Installation via pip without prompt

When I install via pip - no promt or waiting for passphraze.

pip install pyconcrete Collecting pyconcrete Installing collected packages: pyconcrete Successfully installed pyconcrete-0.11.3

Error: raise ValueError('{}.__spec__ is None'.format(name))

Hello dear developer. I've just used an django example, you've provided and it works!
But when i try to run my own django project (after it was encrypted)
I run this to encrypt, command gives encrypted result,
python ../pyconcrete-master/pyconcrete-admin.py compile --source=/Users/bbx/envs/liga-basic/liga-basic-build --pye --remove-py --remove-pyc -i backend/wsgi.py manage

but after i run a server with python manage runserver I get an error:
Traceback (most recent call last): File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper fn(*args, **kwargs) File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run autoreload.raise_last_exception() File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception six.reraise(*_exception) File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise raise value.with_traceback(tb) File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper fn(*args, **kwargs) File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/apps/config.py", line 197, in import_models if module_has_submodule(self.module, MODELS_MODULE_NAME): File "/Users/bbx/.pyenv/versions/mypyenv/lib/python3.5/site-packages/django/utils/module_loading.py", line 79, in module_has_submodule return importlib_find(full_module_name, package_path) is not None File "/Users/bbx/.pyenv/versions/3.5.5/lib/python3.5/importlib/util.py", line 102, in find_spec raise ValueError('{}.__spec__ is None'.format(name)) ValueError: apps.pages.models.__spec__ is None
Is that is a problem of your package or my app?

Python 3.7 support

It looks like pyconcrete do not support python 3.7, which is newest stable version of cpython.
foo.py:

print("hello")
>>> import foo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/env/lib/python3.7/site-packages/pyconcrete/__init__.py", line 76, in load_module
    code = marshal.loads(data[magic:])
ValueError: bad marshal data (unknown type code)

bad marshal data error

Hi, I am getting an error while trying to import a .pye file encrypted using pyconcrete. Below is the error message.

ValueError Traceback (most recent call last)
in ()
1 import pyconcrete
----> 2 from muDetect import Temporal

C:\Anaconda2\lib\site-packages\pyconcrete_init_.py in load_module(self, fullname)
70 magic = 8
71
---> 72 code = marshal.loads(data[magic:])
73
74 m = self.new_module(fullname, self.full_path, self.pkg_path)

ValueError: bad marshal data (unknown type code)

deploy code with different python version

When i try to protect some python sdk with pyconcrete, i just cannot deploy protected python sdk on another pc because python version might be unmatched. But as for python sdk, it might be deployed on a lot of pc of which python version cannot be control, so, is there any way to solve this problem?

multithreading Support

Hi,

I have strange errors . :Is pyconcrete support multithreading python ?

ie :

i am imported 👍

import sqlite3 as lite

but it gives .

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "_mqt_production-RemoteCamMultidb.py", line 745, in update_data_sql_deamon
conn = lite.connect("personelDBv2")
NameError: name 'lite' is not defined

Bad Marshall data

Running pyconcrete files gives me the following error "ValueError: bad marshal data (unknown type code)"

This happens with any file since I did a reinstall of pyconcrete to change the secret password. Before I did the reinstall I deleted all pyconcrete traces from the machine and deleted the generated pye files. Afterwards I ran the setup,py script and set a new passphrase, then recompiled the .py files to .pye file with following command

pyconcrete-admin.py compile --source=file.py --pye

and running the file with

pyconcrete file.pye

I'm using python (Python 2.7.12 (default, Dec 4 2017, 14:50:18) This is set as the machine default.

compile error for VS14(Visual Studio 2015)

R:\pyconcrete>E:\MicrosoftVisualStudio14.0\VC\bin\vcvars32.bat
R:\pyconcrete>SET VS100COMNTOOLS=%VS140COMNTOOLS%

R:\pyconcrete>set DISTUTILS_USE_SDK=1

R:\pyconcrete>set MSSdk=1

R:\pyconcrete>py3 setup.py build --compiler=msvc

R:\pyconcrete>e:\prg\py\Anaconda3_64\python.exe setup.py build --compiler=msvc
running build
running build_py
running build_ext
building 'pyconcrete._pyconcrete' extension
E:\MicrosoftVisualStudio14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
-Isrc\pyconcrete_ext\openaes\inc -Isrc\pyconcrete_ext\include_win -Ie:\prg\py\An
aconda3_64\include -Ie:\prg\py\Anaconda3_64\include /Tcsrc\pyconcrete_ext\pyconc
rete.c /Fobuild\temp.win-amd64-3.4\Release\src\pyconcrete_ext\pyconcrete.obj
pyconcrete.c
src\pyconcrete_ext\openaes\inc\oaes_lib.h(84): error C2061: 语法错误: 标识符“OA
ES_OPTION”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(84): error C2059: 语法错误:“;”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2146: 语法错误: 缺少“)”
(在标识符“option”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2081: “OAES_OPTION”: 形
参表中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2061: 语法错误: 标识符“o
ption”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2059: 语法错误:“;”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2059: 语法错误:“,”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2146: 语法错误: 缺少“;”
(在标识符“data_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2040: “data_len”:“int
”与“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2146: 语法错误: 缺少“;”
(在标识符“data_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2040: “data_len”:“int
”与“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2146: 语法错误: 缺少“;”
(在标识符“m_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2146: 语法错误: 缺少“;”
(在标识符“c_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2040: “c_len”:“int”与
“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2040: “m_len”:“int *”
与“int”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2146: 语法错误: 缺少“;”
(在标识符“c_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2040: “c_len”:“int”与
“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2146: 语法错误: 缺少“;”
(在标识符“c_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2040: “c_len”:“int”与
“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2146: 语法错误: 缺少“;”
(在标识符“data_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2040: “data_len”:“int
”与“int *”的间接寻址级别不同
src\pyconcrete_ext\pyconcrete.c(38): warning C4476: "printf": 格式说明符中的类型
字段字符“P”未知
src\pyconcrete_ext\pyconcrete.c(38): warning C4477: “printf”: 格式字符串“%d”
需要类型“int”的参数,但可变参数 1 拥有了类型“unsigned char *”
src\pyconcrete_ext\pyconcrete.c(38): warning C4474: printf: 格式字符串中传递的参
数太多
src\pyconcrete_ext\pyconcrete.c(38): note: 占位符和其参数预计 1 可变参数,但提供
的却是 2 参数
src\pyconcrete_ext\pyconcrete.c(48): warning C4013: “oaes_key_import_data”未定
义;假设外部返回 int
src\pyconcrete_ext\pyconcrete.c(99): warning C4013: “oaes_encrypt_block”未定义
;假设外部返回 int
src\pyconcrete_ext\pyconcrete.c(79): warning C4996: 'fopen': This function or va
riable may be unsafe. Consider using fopen_s instead. To disable deprecation, us
e _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(205): n
ote: 参见“fopen”的声明
src\pyconcrete_ext\pyconcrete.c(86): warning C4996: 'fopen': This function or va
riable may be unsafe. Consider using fopen_s instead. To disable deprecation, us
e _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(205): n
ote: 参见“fopen”的声明
src\pyconcrete_ext\pyconcrete.c(205): warning C4013: “oaes_decrypt_block”未定
义;假设外部返回 int
error: command 'E:\\MicrosoftVisualStudio14.0\\VC\\BIN\\cl.exe' failed with exit
 status 2

ValueError: bad marshal data (unknown type code)

I use Mingw64+Msys2 to compile pyconcrete for Python 3.4.4 |Anaconda 2.3.0 (64-bit)

for fib.py file

def fib(n):
    if n<=1:
        return 1
    else:
        return fib(n-1) + fib(n-2)

is coded into pye as
python pyconcrete-admin.py compile --source=fib.py --pye

but test.py

import pyconcrete

import fib

for i in range(10):
    print ('fib(%2i) = %2i' %  (i, fib.fib(i)))

says

Traceback (most recent call last):
  File "test.py", line 12, in <module>
    import fib
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "e:\prg\py\Anaconda3_64\lib\site-packages\_pyconcrete\pyconcrete\__init__
.py", line 72, in load_module
    code = marshal.loads(data[magic:])
ValueError: bad marshal data (unknown type code)

Why can the code run correctly without "import pyconcrete" in the main.py?

Thanks for your awesome work, which helps me a lot, but I still find something I can't understand. I use pyconcrete-admin.py to encrypt my all .py file except main.py, but when I run my code without import pyconcret in main.py, it can still run correctly, can you tell me why this happens, thanks anyway.

`pip install pyconcrete`command failed, failed building wheel for pyconcrete

image

Environment

Vagrant:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "bento/centos-6.7"
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.provision "shell", path: "bootstrap.sh"
end

bootstrap.sh:

#!/usr/bin/env bash

python_path=/usr/local

yum -y update && \
    yum groupinstall -y development && \
    yum install -y \
    bzip2-devel \
    git \
    hostname \
    openssl \
    openssl-devel \
    sqlite-devel \
    sudo \
    tar \
    wget \
    zlib-devel \
    mysql-devel \
    libaio \
    libvirt-devel \
    which \
    python-devel \
    readline-devel \
    gdbm-devel \
    ncurses-libs

cd /tmp
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xvfz Python-2.7.6.tgz
cd Python-2.7.6
./configure --prefix=$python_path
make
make install

Python3.7 link fail at Mac

python3.7 setup.py install will get link fail

gcc build/temp.macosx-10.9-x86_64-3.7/src/pyconcrete_exe/pyconcrete_exe.o build/temp.macosx-10.9-x86_64-3.7/src/pyconcrete_ext/pyconcrete.o build/temp.macosx-10.9-x86_64-3.7/src/pyconcrete_ext/openaes/src/oaes_base64.o build/temp.macosx-10.9-x86_64-3.7/src/pyconcrete_ext/openaes/src/oaes_lib.o -lpython3.7m -o build/scripts-3.7/pyconcrete
ld: library not found for -lpython3.7m
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1

Try to get link flag for python3.7
python3.7-config --ldflags

-L/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation

It should add -L/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin for link python3.7m

pyconcrete to ignore a directory.

Is there any support of pyconcrete to ignore directory? I had my venv in the same directory as of django root, and it tries to encrypt my venv as well.

Decrypting .pye files

I'm using pyconcrete as library using the example given in the README.

My project has the following structure:

.
└── myproject
    ├── main.py
    ├── pyconcrete
    └── src
        ├── module1.pye
        ├── module2.pye
        └── module3.pye

What is the process to decrypt module1.pye, module2.pye, etc, given that the passphrase is know?

Now, suppose I distribute myproject to end user.

What you be the process for them to decrypt module1.pye, module2.pye, etc?

Django encryption

Hello,

I like to know if is possible to encrypt also a Django/Celery project ?

Thanks

pyconcrete in venv

It is not possible install pyconcrete under armbian in the venv. Setuptools, wheels are upgraded.

Installing collected packages: pyconcrete
  Running setup.py install for pyconcrete ... error
    ERROR: Complete output from command /home/ft5000/devel/webft/venv/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-3ibr09ow/pyconcrete/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-bt822zc5/install-record.txt --single-version-externally-managed --compile --install-headers /home/ft5000/devel/webft/venv/include/site/python3.6/pyconcrete '--passphrase=<your passphrase>':
    ERROR: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --single-version-externally-managed not recognized
    ----------------------------------------
ERROR: Command "/home/ft5000/devel/webft/venv/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-3ibr09ow/pyconcrete/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-bt822zc5/install-record.txt --single-version-externally-managed --compile --install-headers /home/ft5000/devel/webft/venv/include/site/python3.6/pyconcrete '--passphrase=<your passphrase>'" failed with error code 1 in /tmp/pip-install-3ibr09ow/pyconcrete/

Python version doesn't match with magic: python(62211) != pye(47360)

Traceback (most recent call last):
File "xxxx/2.2.6/src/main.py", line 5, in
from XxxxManager import *
File "/usr/local/lib/python2.7/dist-packages/pyconcrete/init.py", line 63, in load_module
self._validate_version(data)
File "/usr/local/lib/python2.7/dist-packages/pyconcrete/init.py", line 95, in _validate_version
raise ValueError("Python version doesn't match with magic: python(%d) != pye(%d)" % (py_magic, pye_magic))
ValueError: Python version doesn't match with magic: python(62211) != pye(47360)

build on mingw + winXP

Builded on mingw(winXP), and failed.
But I edited source file(roughly). Build successful.

setup.py

# comment out
# if sys.platform == 'win32':
#     include_dirs.append(join(EXT_SRC_DIR, 'include_win'))

/src/pyconcrete_ext/openaes/src/oaes.c

// ignore if block
#if defined(_WIN32) && !defined(__SYMBIAN32__)
#else
	#ifndef _fprintf_p
		#define _fprintf_p fprintf
	#endif // _fprintf_p
#endif
#define _fprintf_p fprintf //added

I think these options need just for MSVC.
Thanks.

run error

Exception ImportError: 'cannot import name logging' in <module 'threading' from '/usr/lib/python2.7/threading.pye'> ignored

pyconcrete and multiprocessing

Hello,

I am trying to use pyconcrete to encrypt a python code using multiprocessing.
This is the code:

from math import sqrt
from joblib import Parallel, delayed
Parallel(n_jobs=2)(delayed(sqrt)(i ** 2) for i in range(10))

The compilation works fine, but at execution time the program crashes with the following message:

Exception ignored in: <module 'threading' from '/Users/stefanosavare/anaconda3/lib/python3.6/threading.py'>
Traceback (most recent call last):
  File "/Users/stefanosavare/anaconda3/lib/python3.6/threading.py", line 1289, in _shutdown
    assert tlock.locked()
SystemError: <built-in method locked of _thread.lock object at 0x1051e83c8> returned a result with an error set

Is there a way to fix it?

Thank you a lot!

compiling a file gives error: *** Error in `pyconcrete': corrupted double-linked list

Here are the modules which are used:

from pytz import timezone
import stomp
import random
import numpy as np
import time
from collections import deque, OrderedDict
from datetime import datetime,timedelta, time
import pandas as pd
import math
import ipdb
import itertools
import pandas as pd
from multiprocessing import Queue 
import json
import copy
import tensorflow as tf
import os
import sys
import datetime

Full error:
*** Error in pyconcrete': corrupted double-linked list: 0x0000000002014800 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fc32c33d7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x80c71)[0x7fc32c346c71]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fc32c34a53c]
pyconcrete[0x40182a]
pyconcrete[0x4014a4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fc32c2e6830]
pyconcrete[0x401529]
======= Memory map: ========
00400000-00407000 r-xp 00000000 103:01 394867 /home/ubuntu/anaconda3/bin/pyconcrete
00606000-00607000 r--p 00006000 103:01 394867 /home/ubuntu/anaconda3/bin/pyconcrete
00607000-00608000 rw-p 00007000 103:01 394867 /home/ubuntu/anaconda3/bin/pyconcrete
01ed4000-0204e000 rw-p 00000000 00:00 0 [heap]
7fc324000000-7fc324021000 rw-p 00000000 00:00 0
7fc324021000-7fc328000000 ---p 00000000 00:00 0
7fc32aff5000-7fc32b00b000 r-xp 00000000 103:01 396802 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc32b00b000-7fc32b20a000 ---p 00016000 103:01 396802 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc32b20a000-7fc32b20b000 rw-p 00015000 103:01 396802 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc32b213000-7fc32b21a000 r-xp 00000000 103:01 545814 /home/ubuntu/anaconda3/lib/python3.5/site-packages/pyconcrete/_pyconcrete.cpython-35m-x86_64-linux-gnu.so
7fc32b21a000-7fc32b419000 ---p 00007000 103:01 545814 /home/ubuntu/anaconda3/lib/python3.5/site-packages/pyconcrete/_pyconcrete.cpython-35m-x86_64-linux-gnu.so
7fc32b419000-7fc32b41a000 r--p 00006000 103:01 545814 /home/ubuntu/anaconda3/lib/python3.5/site-packages/pyconcrete/_pyconcrete.cpython-35m-x86_64-linux-gnu.so
7fc32b41a000-7fc32b41b000 rw-p 00007000 103:01 545814 /home/ubuntu/anaconda3/lib/python3.5/site-packages/pyconcrete/_pyconcrete.cpython-35m-x86_64-linux-gnu.so
7fc32b41b000-7fc32b49b000 rw-p 00000000 00:00 0
7fc32b49b000-7fc32b773000 r--p 00000000 103:01 51155 /usr/lib/locale/locale-archive
7fc32b773000-7fc32b87b000 r-xp 00000000 103:01 399430 /lib/x86_64-linux-gnu/libm-2.23.so
7fc32b87b000-7fc32ba7a000 ---p 00108000 103:01 399430 /lib/x86_64-linux-gnu/libm-2.23.so
7fc32ba7a000-7fc32ba7b000 r--p 00107000 103:01 399430 /lib/x86_64-linux-gnu/libm-2.23.so
7fc32ba7b000-7fc32ba7c000 rw-p 00108000 103:01 399430 /lib/x86_64-linux-gnu/libm-2.23.so
7fc32ba7c000-7fc32ba7e000 r-xp 00000000 103:01 401388 /lib/x86_64-linux-gnu/libutil-2.23.so
7fc32ba7e000-7fc32bc7d000 ---p 00002000 103:01 401388 /lib/x86_64-linux-gnu/libutil-2.23.so
7fc32bc7d000-7fc32bc7e000 r--p 00001000 103:01 401388 /lib/x86_64-linux-gnu/libutil-2.23.so
7fc32bc7e000-7fc32bc7f000 rw-p 00002000 103:01 401388 /lib/x86_64-linux-gnu/libutil-2.23.so
7fc32bc7f000-7fc32bc82000 r-xp 00000000 103:01 401383 /lib/x86_64-linux-gnu/libdl-2.23.so
7fc32bc82000-7fc32be81000 ---p 00003000 103:01 401383 /lib/x86_64-linux-gnu/libdl-2.23.so
7fc32be81000-7fc32be82000 r--p 00002000 103:01 401383 /lib/x86_64-linux-gnu/libdl-2.23.so
7fc32be82000-7fc32be83000 rw-p 00003000 103:01 401383 /lib/x86_64-linux-gnu/libdl-2.23.so
7fc32be83000-7fc32be9c000 r-xp 00000000 103:01 396873 /lib/x86_64-linux-gnu/libz.so.1.2.8
7fc32be9c000-7fc32c09b000 ---p 00019000 103:01 396873 /lib/x86_64-linux-gnu/libz.so.1.2.8
7fc32c09b000-7fc32c09c000 r--p 00018000 103:01 396873 /lib/x86_64-linux-gnu/libz.so.1.2.8
7fc32c09c000-7fc32c09d000 rw-p 00019000 103:01 396873 /lib/x86_64-linux-gnu/libz.so.1.2.8
7fc32c09d000-7fc32c0c3000 r-xp 00000000 103:01 395910 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fc32c0c3000-7fc32c2c3000 ---p 00026000 103:01 395910 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fc32c2c3000-7fc32c2c5000 r--p 00026000 103:01 395910 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fc32c2c5000-7fc32c2c6000 rw-p 00028000 103:01 395910 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fc32c2c6000-7fc32c486000 r-xp 00000000 103:01 401381 /lib/x86_64-linux-gnu/libc-2.23.so
7fc32c486000-7fc32c686000 ---p 001c0000 103:01 401381 /lib/x86_64-linux-gnu/libc-2.23.so
7fc32c686000-7fc32c68a000 r--p 001c0000 103:01 401381 /lib/x86_64-linux-gnu/libc-2.23.so
7fc32c68a000-7fc32c68c000 rw-p 001c4000 103:01 401381 /lib/x86_64-linux-gnu/libc-2.23.so
7fc32c68c000-7fc32c690000 rw-p 00000000 00:00 0
7fc32c690000-7fc32c6a8000 r-xp 00000000 103:01 401380 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fc32c6a8000-7fc32c8a7000 ---p 00018000 103:01 401380 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fc32c8a7000-7fc32c8a8000 r--p 00017000 103:01 401380 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fc32c8a8000-7fc32c8a9000 rw-p 00018000 103:01 401380 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fc32c8a9000-7fc32c8ad000 rw-p 00000000 00:00 0
7fc32c8ad000-7fc32cc6b000 r-xp 00000000 103:01 5417 /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
7fc32cc6b000-7fc32ce6a000 ---p 003be000 103:01 5417 /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
7fc32ce6a000-7fc32ce6c000 r--p 003bd000 103:01 5417 /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
7fc32ce6c000-7fc32cf03000 rw-p 003bf000 103:01 5417 /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
7fc32cf03000-7fc32cf34000 rw-p 00000000 00:00 0
7fc32cf34000-7fc32cf5a000 r-xp 00000000 103:01 401379 /lib/x86_64-linux-gnu/ld-2.23.so
7fc32cf5a000-7fc32d152000 rw-p 00000000 00:00 0
7fc32d152000-7fc32d159000 r--s 00000000 103:01 6146 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7fc32d159000-7fc32d15a000 r--p 00025000 103:01 401379 /lib/x86_64-linux-gnu/ld-2.23.so
7fc32d15a000-7fc32d15b000 rw-p 00026000 103:01 401379 /lib/x86_64-linux-gnu/ld-2.23.so
7fc32d15b000-7fc32d15c000 rw-p 00000000 00:00 0
7ffe42d4a000-7ffe42d6b000 rw-p 00000000 00:00 0 [stack]
7ffe42d9a000-7ffe42d9d000 r--p 00000000 00:00 0 [vvar]
7ffe42d9d000-7ffe42d9f000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)`

Deployment Issue

I am encrypting a project using pyconcrete but in venv. Now I'm trying to drop all the venv in another pc/laptop. When I run the code for that it gives me threading error and pushing the whole thing on the local interpreter. /usr/lib/python/threading.py

Last versions of pyconcrete corrupts pip/python on some environment...

Hello Falldog,

Thanks a lot for your amazing work.
I found out that I couldn't use pip anymore on my machine. I struggled during days to find why, and it seems that pyconcrete brings some issue for its latest versions (since it create a .pth file to auto-import itself...)

However, this bug only concerns some distribution.
Here is a code that will allow you to reproduce the bug on different environment : pyconcrete_corrupts_python.tar.gz

For example, on Debian-jessie + Miniconda 4.0.5 + pyconcrete (#commit >= 095e760) => Bug
For Debian-jessie + Python2.7 + pip9.0.9 + pyconcrete => There is no bug

I will continue to work on it during my free time and keep you informed (I may will come up with a pull request if I can fix it by myself... ;) )

File: src\pyconcrete_ext\pyconcrete.c, Line 213

I compile pyconcrete again, however, this time

R:\pyconcrete>py3 test.py

R:\pyconcrete>e:\prg\py\Anaconda3_64\python.exe test.py
Assertion failed!

Program: e:\prg\py\Anaconda3_64\python.exe
File: src\pyconcrete_ext\pyconcrete.c, Line 213

Expression: PyBytes_Check(py_plain_obj)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

android compiled?

any chance you could write up a guide on how i could compile pyconcrete.so for android/arm32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.