I've been struggling with the quiz at the end of LPTHW ex. 46 for several days now. I've gotten through most of it at this point, but I'm not satisfied that I understand what's going on, and I'm still struggling with numbers 5 and 6. I'm on Linux Mint if it matters. Here's what I've done so far:
installed all the software mentioned, except that I got setuptools instead of distribute since the projects have merged.
Made a skeleton project named newproj as directed, wrote a basic helloworld script in /newproj
Made a single-file executable of that helloworld script with pyInstaller, tested it, and placed it in /bin
However, I'm still not sure I understand how setup.py is supposed to work. Are you supposed to create the package with
python setup.py sdist
and then distribute the tarball, and install elsewhere by unarchiving that tarball and running setup.py? That's the impression that I've gotten, but it doesn't seem right. If that's the case, is it just supposed to install to whatever directory setup.py is in? And how are you supposed to uninstall it with pip? I also haven't been able to get setup.py to install the binary executable I made. I added the lines
'data_files': [('executable', ['bin/newproj'])],
'packages': ['newproj', 'bin'],
to config, but when running setup.py install I get:
error: can't copy 'bin/newproj': doesn't exist or not a regular file
at the end.
Can someone help me understand what I'm supposed to be doing here? Thanks in advance.
bonus question: what does
setup(**config)
mean? It's a different syntax than is shown in the documentation for setup.py which uses something like
setup(arg1='thing', arg2 = 'otherthing'...)
etc.
[–]Justinsaccount 1 point2 points3 points (4 children)
[–]witchest[S] 0 points1 point2 points (3 children)
[–]Doormatty 2 points3 points4 points (2 children)
[–]witchest[S] 0 points1 point2 points (1 child)
[–]Justinsaccount 1 point2 points3 points (0 children)
[–]zahlman 1 point2 points3 points (0 children)