[PyInstaller] Re: any easy way to re-use what pyinstaller has created?

2020-07-06 Thread 进陆


在 2020年7月6日星期一 UTC+8下午8:18:37,bwoodsend写道:
>
> Hello,
>
> Firstly you certainly shouldn’t need to copy those files about. It looks 
> like the problem is nimpy can’t read the standard lib files from the 
> base_library.zip archive and you’re extracting them manually. 
>
if I copy pyc files(i.e. contextlib.pyc, genericpath.pyc, ntpath.pyc, 
os.pyc, site.pyc, stat.pyc, sysconfig.pyc, token.pyc, tokenize.pyc, 
_sitebuiltins.pyc) into `base_library.zip`, `main_nim.exe` can run which 
means `nimpy` can read modules from `base_library.zip`
 

> You can tell PyInstaller not to use the zip by adding the kwarg 
> noarchive=True to the a = Analysis(...) section of the main.spec file. 
> (If you’re new to spec files - it’s just a Python script containing all the 
> build code.) If you edit the spec you must use PyInstaller main.spec 
> instead of PyInstaller main.py or you will lose your changes.
>
I found I can use `pyinstaller  -d noarchive main.py` to tell pyinstaller 
not to create `base_library.zip`. Then pyinstaller can produce run-able 
`main.exe` from `main.py`

but I still need to copy 3 files(site.py,  _sitebuiltins.py and 
sysconfig.py) to ensure `main_nim.exe`(just as the name suggested, which is 
created by nim code) can run  

so that is not so-automatic yet.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/28cb1ca1-1f6c-4b7f-9fe0-ba6a90515370o%40googlegroups.com.


[PyInstaller] Re: any easy way to re-use what pyinstaller has created?

2020-07-06 Thread 进陆


在 2020年7月6日星期一 UTC+8下午8:18:37,bwoodsend写道:
>
> Hello,
>
> Firstly you certainly shouldn’t need to copy those files about. It looks 
> like the problem is nimpy can’t read the standard lib files from the 
> base_library.zip archive and you’re extracting them manually. You can 
> tell PyInstaller not to use the zip by adding the kwarg noarchive=True to 
> the a = Analysis(...) section of the main.spec file. (If you’re new to 
> spec files - it’s just a Python script containing all the build code.) If 
> you edit the spec you must use PyInstaller main.spec instead of PyInstaller 
> main.py or you will lose your changes.
>
I found I can use `pyinstaller  -d noarchive main.py` to tell pyinstaller 
not to create `base_library.zip`. Then pyinstaller can produce ruan-able 
`main.exe` from `main.py`

but I still need to copy 3 files(site.py,  _sitebuiltins.py and 
sysconfig.py) to ensure `main_nim.exe`(just as the name suggested, which is 
created by nim code) can run   
 

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/bba1667c-5c22-4329-a487-dcd5b003efa2o%40googlegroups.com.


[PyInstaller] Re: any easy way to re-use what pyinstaller has created?

2020-07-06 Thread bwoodsend


Hello,

Firstly you certainly shouldn’t need to copy those files about. It looks 
like the problem is nimpy can’t read the standard lib files from the 
base_library.zip archive and you’re extracting them manually. You can tell 
PyInstaller not to use the zip by adding the kwarg noarchive=True to the a 
= Analysis(...) section of the main.spec file. (If you’re new to spec files 
- it’s just a Python script containing all the build code.) If you edit the 
spec you must use PyInstaller main.spec instead of PyInstaller main.py or 
you will lose your changes.

Assuming the above doesn’t fix your problem: You can’t reuse bits of a 
build in the way you’re suggesting but you can still automate them. Again, 
use the spec file. You could append code to the end of your spec (such as 
code to copy those files in) and it will run that code after every build.

Also, I recommend Markdown Here  for using 
markdown in Google Groups.

Brénainn

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/9157bc9d-aebf-4d62-8959-506eff6918b8n%40googlegroups.com.