-
Notifications
You must be signed in to change notification settings - Fork 34
Error when build #30
Comments
Thanks for the feedback. The error has been reported at python-distro/distro#260. I will look at other feedback soon. |
Also pushd and popd are only in bash, and not in shell. |
I fixed shebang lines for scripts. Now they should run fine for most Linux distros.
I already check python3-android/Android/util.py Line 31 in 49f8d3f
Checking Python version is more tricky as newer or older Python versions may or may not work. I don't plan to add complex checks.
Mind to share more details? Dynamic modules already run fine.
Well, most likely Python 3.9 has much more stuffs than Python 2.7.8 and 3.4.2. The steps in that article are mostly the same as my scripts. [1] https://bugs.python.org/issue26852 |
I tried building the static version several times, but I failed in places: ssl, pip and other standard python modules. if you use strip -s on a static assembly and then make clean it will reduce the size of python itself by 2-3 times
I am not talking about that. I'm generally about checking in bash script for version availability like this:
|
yoh!!! |
To solve this problem it is necessary to replace
#!/usr/bin/env python
On
#!/usr/bin/env python3
in all *.py files
The wish is to make the assembly static so that you can safely use it.
I have an article on how to do this and how to achieve a finished size of ~ 50-60 mb instead of 160 mb as it is now
Here how do it
Also this error when compiling
ERROR: Exception: Traceback (most recent call last): File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 188, in main status = self.run(options, args) File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 286, in run with self._build_session(options) as session: File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 101, in _build_session session = PipSession( File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/download.py", line 559, in __init__ self.headers["User-Agent"] = user_agent() File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/download.py", line 144, in user_agent zip(["name", "version", "id"], distro.linux_distribution()), File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 122, in linux_distribution return _distro.linux_distribution(full_distribution_name) File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 677, in linux_distribution self.version(), File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 737, in version self.lsb_release_attr('release'), File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 899, in lsb_release_attr return self._lsb_release_info.get(attribute, '') File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 552, in __get__ ret = obj.__dict__[self._fname] = self._f(obj) File "/tmp/tmp01392fio/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 1012, in _lsb_release_info stdout = subprocess.check_output(cmd, stderr=devnull) File "/home/sam/Загрузки/python3-android-master/src/cpython/Lib/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/sam/Загрузки/python3-android-master/src/cpython/Lib/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1. Makefile:1239: recipe for target 'install' failed make: *** [install] Error 2
And why not compiling next modules?
`Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_lzma _sqlite3 _ssl
_tkinter _uuid nis
readline spwd zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc atexit pwd
time
Failed to build these modules:
_ctypes _hashlib
Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, libressl/portable#381
`
Sorry for my English (Google translate)
The text was updated successfully, but these errors were encountered: