Jul-25-2017, 12:53 AM
Jul-25-2017, 01:08 AM
The docs https://docs.python.org/2/distutils/sourcedist.html are pretty good on this,
and it's the first topic
and it's the first topic
Jul-27-2017, 09:41 PM
thanks for the info, I checked the py3.6 docs and found My setup file was horribly put together. I have installed vsearch in site-packages file but when I try to import it I have had no luck. It is listed in site-packages as "vsearch-1.0.py3.6egg-info" I have tried
"from site-packages import vsearch" and get an invalid syntax error with the carat pointing at the hyphen. I have tried various just "import vsearch" and I get a no module found, I thought this would work since 'site-packages' is on the Python search path. I have tried the whole tag "vsearch-1.0.py3.6egg-info" and get an invalid syntax error. I have tried partial tags and also get an invalid syntax error. Any suggestions would be appreciated. One more question can you rename a module to a simpler syntax?
"from site-packages import vsearch" and get an invalid syntax error with the carat pointing at the hyphen. I have tried various just "import vsearch" and I get a no module found, I thought this would work since 'site-packages' is on the Python search path. I have tried the whole tag "vsearch-1.0.py3.6egg-info" and get an invalid syntax error. I have tried partial tags and also get an invalid syntax error. Any suggestions would be appreciated. One more question can you rename a module to a simpler syntax?
Jul-28-2017, 02:38 AM
don't install by moving it into site-packages. While that might work in simple cases, it won't if there
are dependencies. You need to install using pip, or setup.py.
Please read this tutorial: https://python-forum.io/Thread-Basic-Pac...-py-Freeze
are dependencies. You need to install using pip, or setup.py.
Please read this tutorial: https://python-forum.io/Thread-Basic-Pac...-py-Freeze
Jul-28-2017, 06:52 AM
Follow tutorial here so you are sure that python and pip work from anywhere in cmd.
I guess you follow tutorial in this book.
pip can install from either Source Distributions (sdist) or Wheels.
Wheel is the preferred format and what i show how to make in Packaging/Modules--Wheel--pip--setup.py--Freeze.
Make Source Distribution
Both install with pip
I guess you follow tutorial in this book.
pip can install from either Source Distributions (sdist) or Wheels.
Wheel is the preferred format and what i show how to make in Packaging/Modules--Wheel--pip--setup.py--Freeze.
hare50 Wrote:sdist is tagged as unknownMake wheel.
python setup.py bdist_wheel
Make Source Distribution
python setup.py sdist
Both install with pip
pip install name_of_wheel.whl
pip install name_of_sdist.zip
Jul-28-2017, 04:58 PM
although I was in windows10 sdist put my file in a tarball. I added --formats=zip to sdist in setup(). Why the tarball if sdist is supposed to zip files on the windows platform.
Jul-28-2017, 05:24 PM
You can force it make zip.
But you should really make wheel ☸
python setup.py sdist --formats=zip
But you should really make wheel ☸
Aug-01-2017, 08:52 PM
Since I can't find a place to start a new thread, I have three questions. 1) where is the place to store binary extensions? 2) will 'import foo' accept a directory? 3)where is the best place to store self-made modules and how do you store them with attributes in the command?
Aug-02-2017, 07:54 AM
I upgraded to 3.6.2 and now a call to 'setup.py' responds with an [errno 2= no module found}. I have search Python36 directory and can only find 'setup.py' in modules I wrote under 3.6.1. where does 'setup.py, reside?
Aug-02-2017, 09:25 AM
hare50 Wrote:where does 'setup.py, reside?You miss the point,you make
setup.py
If look at my tutorial that has been posted before.
Making the first wheel i have
setup.py
and power.py
is same folder.In
setup.py
i point to py_modules=['power']
module which is file power.py
.Then i make wheel.
python setup.py bdist_wheel --universal
I do not mention Source Distributions(sdist),because wheel is the preferred way.
But can make zip file with same
setup.py
bye running.python setup.py sdist --formats=zip