Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You are false data.


devel / comp.lang.python / Re: Windows installer from python source code without access to source code

SubjectAuthor
o Re: Windows installer from python source code without access toJim Schwartz

1
Re: Windows installer from python source code without access to source code

<mailman.2.1680819342.20750.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=27238&group=comp.lang.python#27238

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: jschwar@sbcglobal.net (Jim Schwartz)
Newsgroups: comp.lang.python
Subject: Re: Windows installer from python source code without access to
source code
Date: Thu, 6 Apr 2023 17:14:41 -0500
Lines: 170
Message-ID: <mailman.2.1680819342.20750.python-list@python.org>
References: <CAN71zOyiMKNZ-YyDJ0R7zzT0Z1pa_VofnJCkb8nTciwk4JNwPw@mail.gmail.com>
<B65CF219-9B1A-4725-9635-AF012FB057F1@sbcglobal.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
X-Trace: news.uni-berlin.de f+3P8JUrexPcG7mH6xdiKw0fgj4ZlFTjs8YewowC4EmA==
Return-Path: <jschwar@sbcglobal.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=sbcglobal.net header.i=@sbcglobal.net header.b=XajNYPTs;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'generated': 0.03;
'traceback': 0.04; '(most': 0.05; '2022': 0.05; '31,': 0.05;
'iphone': 0.05; 'last):': 0.05; 'subject:python': 0.06; '2023':
0.07; 'received:66.163.188': 0.07; 'subject:Windows': 0.07;
'subject:without': 0.07; 'bat': 0.09; 'c++.': 0.09; 'carlos':
0.09; 'cc:addr:python-list': 0.09; 'compiler': 0.09; 'const':
0.09; 'installer': 0.09; 'int': 0.09; 'obviously,': 0.09;
'prompt.': 0.09; 'skip:_ 20': 0.09; 'snippets': 0.09; 'though.':
0.09; 'downloaded': 0.13; '&gt;': 0.14; 'cc:no real name:2**0':
0.14; 'url:mailman': 0.15; '"hello,': 0.16; '&amp;&amp;': 0.16;
'&lt;': 0.16; 'barry': 0.16; 'char': 0.16; 'command:': 0.16;
'compiled': 0.16; 'directory.': 0.16; 'dlls': 0.16; 'embeddable':
0.16; 'eryk': 0.16; 'executable': 0.16; 'extensions': 0.16;
'init': 0.16; 'program?': 0.16; 'script.': 0.16; 'static': 0.16;
'subject:code': 0.16; 'subject:source': 0.16; 'wrote:': 0.16;
'python': 0.16; 'developer': 0.16; 'code.': 0.17; 'pm,': 0.19;
'reduce': 0.19; 'cc:addr:python.org': 0.20; 'written': 0.22;
"i've": 0.22; 'ran': 0.22; 'skip:_ 10': 0.22; 'version': 0.23;
'install': 0.23; 'code': 0.23; 'command': 0.23; 'installed': 0.23;
'run': 0.23; 'skip:- 10': 0.25; 'url-ip:188.166.95.178/32': 0.25;
'url-ip:188.166.95/24': 0.25; 'python,': 0.25; 'url:listinfo':
0.25; 'cc:2**0': 0.25; 'url-ip:188.166/16': 0.25; 'friday,': 0.26;
'library': 0.26; 'object': 0.26; 'visual': 0.26; 'creating': 0.27;
'etc': 0.28; 'example,': 0.28; 'requests': 0.28; 'environment':
0.29; 'skip:_ 40': 0.31; 'module': 0.31; 'program,': 0.31;
'community': 0.31; 'url-ip:188/8': 0.31; 'program': 0.31;
"doesn't": 0.32; 'question': 0.32; 'needed,': 0.32; 'but': 0.32;
"i'm": 0.33; 'there': 0.33; 'march': 0.33; 'script': 0.33;
'windows': 0.34; 'someone': 0.34; 'header:In-Reply-To:1': 0.34;
'particularly': 0.35; 'following': 0.35; 'received:66': 0.35;
'files': 0.36; 'source': 0.36; 'subject:from': 0.37; 'using':
0.37; 'file': 0.38; 'could': 0.38; 'this,': 0.39;
'received:66.163': 0.39; 'received:consmr.mail.ne1.yahoo.com':
0.39; 'use': 0.39; 'prompt': 0.39; 'studio': 0.40; 'something':
0.40; 'hello,': 0.40; 'want': 0.40; 'from:': 0.62; 'to:': 0.62;
'skip:* 20': 0.62; 'here': 0.62; 'email': 0.63; 'copy': 0.63;
'once': 0.63; 'skip:m 20': 0.63; 'hear': 0.64; 'complete': 0.64;
're:': 0.64; 'your': 0.64; 'his': 0.65; 'named': 0.65;
'response.': 0.68; 'before,': 0.69; 'cc:': 0.69; 'skip:/ 10':
0.69; 'unsubscribe': 0.72; 'waiting': 0.73; 'easy': 0.74; 'tools':
0.74; 'read,': 0.75; 'skip:f 20': 0.75; 'rights': 0.76; 'sent:':
0.78; '(c)': 0.81; 'reserved.': 0.81; 'copyright': 0.84;
'converted': 0.84; 'extracted': 0.84; 'optimizing': 0.84; 'skip:&
50': 0.84; 'incremental': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s2048;
t=1680819335; bh=NrI/fDCN55YmSBxAsq/AtSy+zSkQJBu93x0URWzy+Lk=;
h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To;
b=XajNYPTsaZQgfVzGSAPsUeGJn2oa6fEoGrk75xq6fNTCy12dJ3IFypp+o3XRakDvJmV3CxA055c84q5V+MZKiP6579TANLA+1wuTRCScL8ldfT4oQSDcX1P6zwLZFg8nKw4Acfc+YoxpHMJ7wEUSeozXLJymJFOAumnzb9ZaNoUKW1RLb7v+7QdDiW5YiL7/Q+ua1Qr988hlrZUydLxKWAqZe96hKtnrxgEFXD8+sHdx2uP4RFRWdYYB7K15YgzTBmvGLJ3ssImaj+lznr9/+fmDGVtVuoi7PeGX1iZd/OMRJeHS3gWS8Ensl5JSTQrm/acRDAfAbiFb1WuSSLbyuw==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
t=1680819335; bh=QUqpv+QPmX6/E5d4h/aIs9dz8eu6dCjhyq/5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UrACF5fYAryZ0u6IRGkAIklhQk08YVh73Fkf8GSqcx6.pCpTQ22lOxNm1t.sDeAMqv618N
VKQeJDkgaydUecnEjZOWkAWjh0sgV3SVGI7Ol3zgIrY81xbzLMn7Ekh1W.T2wT5o0l2d9ylDRjgP
fDlNmNWMT5wCtflocrcG0Zq3TnYdkCAt1tmg31e_eOO.uMnOGQEID01Od1c63hKD3dgbBMNUT_5f
MTlsoNQa8kwFV8OPhKxoT8lw9Ii.cUMoxytm64UMVbYygM89V5Cc5uZsFzpUzGrs3SHkrCQrzvH_
BjdD09ZIjnirL4TUpM6MafuIy.gRgyeYauWE7YLHJqBYWfN1tDI1Mc7y5I8iWgZ0mCCqjWvWx8Xo
8fSHhAh3wgBZse.ZtnOVhxKmScVIfhng89EaN3qb3XHEmRDFC46mI6O3.yWjSp1H9mfjsWbIFEjL
JxGn59xoAtY3csO5J4r0qRq1IOL5jlH4ULwkaJMCpSdFjebOOHHszzy1yaK_x71tMJpUTafHerDR
GXt20f9mXreQPsDRraDFD_zs3BWK9kYIpFUHIF1cwOH4yyKw5daGWi799iU7GVWCvRVgTpDkJ
X-Sonic-MF: <jschwar@sbcglobal.net>
X-Sonic-ID: 82270157-dd40-4654-8d58-ffdc25fa866d
In-Reply-To: <CAN71zOyiMKNZ-YyDJ0R7zzT0Z1pa_VofnJCkb8nTciwk4JNwPw@mail.gmail.com>
X-Mailer: iPhone Mail (20E247)
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <B65CF219-9B1A-4725-9635-AF012FB057F1@sbcglobal.net>
X-Mailman-Original-References: <CAN71zOyiMKNZ-YyDJ0R7zzT0Z1pa_VofnJCkb8nTciwk4JNwPw@mail.gmail.com>
 by: Jim Schwartz - Thu, 6 Apr 2023 22:14 UTC

Could someone please help Carlos?  I’m not sure how to answer his
question 

Sent from my iPhone

On Apr 6, 2023, at 3:53 PM, Carlos Fulqueris <cafulque@gmail.com> wrote:


Hello Jim,
How can I unsubscribe to this email list?
I'm waiting for your response.
Thanks
Carlos
El jue, 6 abr 2023 a las 16:52, Jim Schwartz
(<[1]jschwar@sbcglobal.net>) escribió:

I downloaded VS community 2022 and I know how to access the developer
command prompt.  I'm using the one called x64 Native Tools Command
Prompt for VS 2022

I ran a command to compile my python code that was converted to c with
the following command:

H:\Users\LindaJim\Documents\SourceCode\Software\aws_pc_backup\src\c>cl
/O2
/I"C:\\Users\\jschw\\AppData\\Local\\Programs\\Python\\Python3112\\include\\"
aws_pc_backup.c
C:\\Users\\jschw\\AppData\\Local\\Programs\\Python\\Python3112\\libs\\python311.lib
Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32216.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

aws_pc_backup.c
Microsoft (R) Incremental Linker Version 14.35.32216.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:aws_pc_backup.exe
aws_pc_backup.obj
C:\\Users\\jschw\\AppData\\Local\\Programs\\Python\\Python3112\\libs\\python311.lib
   Creating library aws_pc_backup.lib and object aws_pc_backup.exp

When I ran the program, I got this, though.  Obviously, it doesn't
know about the requests package.  Do I have to link something in with
the executable?

H:\Users\LindaJim\Documents\SourceCode\Software\aws_pc_backup\src\c>aws_pc_backup.exe
-m:lb
Traceback (most recent call last):
  File "src\\python\\aws_pc_backup_main.py", line 7, in init
python.aws_pc_backup_main
ModuleNotFoundError: No module named 'requests'

-----Original Message-----
From: Barry <[2]barry@barrys-emacs.org>
Sent: Tuesday, April 4, 2023 1:25 PM
To: Jim Schwartz <[3]jschwar@sbcglobal.net>
Cc: Eryk Sun <[4]eryksun@gmail.com>; [5]python-list@python.org
Subject: Re: Windows installer from python source code without access
to source code

> On 4 Apr 2023, at 16:28, Jim Schwartz <[6]jschwar@sbcglobal.net>
wrote:
>
> Where can I download that cl program?  I've used gcc before, but I
hear that cl can use a setup.py program to run the compile and link
and create a windows .msi installer.  Is that true? 

It is part of visual studio C++.
Once you have that installed there are bat files that setup
environment in the terminal.
Then you can use cl, nmake etc

Barry
>
> -----Original Message-----
> From: Eryk Sun <[7]eryksun@gmail.com>
> Sent: Friday, March 31, 2023 12:55 PM
> To: Jim Schwartz <[8]jschwar@sbcglobal.net>
> Cc: [9]python-list@python.org
> Subject: Re: Windows installer from python source code without
access
> to source code
>
>> On 3/31/23, Jim Schwartz <[10]jschwar@sbcglobal.net> wrote:
>> I want a windows installer to install my application that's written
>> in python, but I don't want the end user to have access to my
source code.
>
> Cython can compile a script to C source code for a module or
executable (--embed). The source can be compiled and linked normally.
> For example, the following builds a "hello.exe" executable based on
a "hello.py" script.
>
>> cython -3 --embed hello.py
>> set "PYI=C:\Program Files\Python311\include"
>> set "PYL=C:\Program Files\Python311\libs"
>> cl /I"%PYI%" hello.c /link /libpath:"%PYL%"
>> copy hello.exe embed
>> embed\hello.exe
>    Hello, World!
>
> I extracted the complete embeddable distribution of Python 3.11 into
the "embed" directory. You can reduce the size of the installation, if
needed, by minimizing the zipped standard library and removing pyd
extensions and DLLs that your application doesn't use.
>
> The generated "hello.c" is large and not particularly easy to read,
but here are some snippets [...]:
>
>    [...]
>    /* Implementation of 'hello' */
>    static PyObject *__pyx_builtin_print;
>    static const char __pyx_k_main[] = "__main__";
>    static const char __pyx_k_name[] = "__name__";
>    static const char __pyx_k_test[] = "__test__";
>    static const char __pyx_k_print[] = "print";
>    static const char __pyx_k_Hello_World[] = "Hello, World!";
>    [...]
>      /* "hello.py":1
>     * print("Hello, World!")             # <<<<<<<<<<<<<<
>     */
>      __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Hello_World);
>            if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 1,
__pyx_L1_error)
>    [...]
>      /* "hello.py":1
>     * print("Hello, World!")             # <<<<<<<<<<<<<<
>     */
>      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print,
__pyx_tuple_,
>                                      NULL);
>            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
>    [...]
>    int wmain(int argc, wchar_t **argv) {
>    [...]
>        if (argc && argv)
>            Py_SetProgramName(argv[0]);
>        Py_Initialize();
>        if (argc && argv)
>            PySys_SetArgv(argc, argv);
>    [...]
>              m = PyInit_hello();
>    [...]
>        if (Py_FinalizeEx() < 0)
>            return 2;
>    [...]
>        return 0;
>    [...]
>
> --
> [11]https://mail.python.org/mailman/listinfo/python-list
>

--
[12]https://mail.python.org/mailman/listinfo/python-list

References

Visible links
1. mailto:jschwar@sbcglobal.net
2. mailto:barry@barrys-emacs.org
3. mailto:jschwar@sbcglobal.net
4. mailto:eryksun@gmail.com
5. mailto:python-list@python.org
6. mailto:jschwar@sbcglobal.net
7. mailto:eryksun@gmail.com
8. mailto:jschwar@sbcglobal.net
9. mailto:python-list@python.org
10. mailto:jschwar@sbcglobal.net
11. https://mail.python.org/mailman/listinfo/python-list
12. https://mail.python.org/mailman/listinfo/python-list


devel / comp.lang.python / Re: Windows installer from python source code without access to source code

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor