Comments (6)
For setup.py, I figured if you use setup
from setuptools
instead of distutils.core
it is possible to automatically download from PIP when you run python3 setup.py install
. Is there a reason not using setuptools
?
from sos.
I do not know the status of setuptools
because I heard that it is depredated, being merged to distutils2
etc and I do not even know if it works for python 3. If you can confirm that setuptools
works and can install psutils
etc, please make the change.
from sos.
I removed my conda and test the installation from scratch. setuptools
works except for this one glitch:
from pysos import __version__
File "/home/gaow/GIT/SOS/pysos/__init__.py", line 39, in <module>
from .sos_script import *
File "/home/gaow/GIT/SOS/pysos/sos_script.py", line 43, in <module>
import billiard as mp
ImportError: No module named 'billiard'
You see my system does not have billiard / celery yet. Because the setup script tries to get the version info it imports init.py early-on which is problematic as seen above. Changing __version__
to a hard-coded number in setup.py works just fine. So there is this decision you'll have to make:
diff --git a/setup.py b/setup.py
index e9293fd..7188290 100644
--- a/setup.py
+++ b/setup.py
@@ -20,11 +20,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from distutils.core import setup
-from pysos import __version__
+from setuptools import setup
setup(name = "sos",
- version = __version__,
+ version = '0.5.6',
The output with the updated setup.py is:
running install
running bdist_egg
running egg_info
writing top-level names to sos.egg-info/top_level.txt
writing dependency_links to sos.egg-info/dependency_links.txt
writing sos.egg-info/PKG-INFO
writing requirements to sos.egg-info/requires.txt
reading manifest file 'sos.egg-info/SOURCES.txt'
writing manifest file 'sos.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/pysos
copying build/lib/pysos/__init__.py -> build/bdist.linux-x86_64/egg/pysos
copying build/lib/pysos/utils.py -> build/bdist.linux-x86_64/egg/pysos
copying build/lib/pysos/sos_script.py -> build/bdist.linux-x86_64/egg/pysos
copying build/lib/pysos/actions.py -> build/bdist.linux-x86_64/egg/pysos
byte-compiling build/bdist.linux-x86_64/egg/pysos/__init__.py to __init__.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/pysos/utils.py to utils.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/pysos/sos_script.py to sos_script.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/pysos/actions.py to actions.cpython-35.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.5/sos -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.5/sos-runner -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/sos to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/sos-runner to 755
copying sos.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sos.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sos.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sos.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sos.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/sos-0.5.6-py3.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing sos-0.5.6-py3.5.egg
Copying sos-0.5.6-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding sos 0.5.6 to easy-install.pth file
Installing sos-runner script to /home/shared/miniconda3/bin
Installing sos script to /home/shared/miniconda3/bin
Installed /home/shared/miniconda3/lib/python3.5/site-packages/sos-0.5.6-py3.5.egg
Processing dependencies for sos==0.5.6
Searching for celery
Reading https://pypi.python.org/simple/celery/
Best match: celery 3.1.23
Downloading https://pypi.python.org/packages/source/c/celery/celery-3.1.23.tar.gz#md5=c6f10f956a49424d553ab1391ab39ab2
Processing celery-3.1.23.tar.gz
Writing /tmp/easy_install-y05oef9b/celery-3.1.23/setup.cfg
Running celery-3.1.23/setup.py -q bdist_egg --dist-dir /tmp/easy_install-y05oef9b/celery-3.1.23/egg-dist-tmp-5u8d6rbc
- Trying to upgrade 'task' in 'celery.app'
- upgrade task: no old version found.
no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.sw*'
creating /home/shared/miniconda3/lib/python3.5/site-packages/celery-3.1.23-py3.5.egg
Extracting celery-3.1.23-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding celery 3.1.23 to easy-install.pth file
Installing celerybeat script to /home/shared/miniconda3/bin
Installing celeryd script to /home/shared/miniconda3/bin
Installing celeryd-multi script to /home/shared/miniconda3/bin
Installing celery script to /home/shared/miniconda3/bin
Installed /home/shared/miniconda3/lib/python3.5/site-packages/celery-3.1.23-py3.5.egg
Searching for psutil
Reading https://pypi.python.org/simple/psutil/
Best match: psutil 4.1.0
Downloading https://pypi.python.org/packages/source/p/psutil/psutil-4.1.0.tar.gz#md5=017e1023484ebf436d3514ebeaf2e7e9
Processing psutil-4.1.0.tar.gz
Writing /tmp/easy_install-gt0pp0ae/psutil-4.1.0/setup.cfg
Running psutil-4.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gt0pp0ae/psutil-4.1.0/egg-dist-tmp-6klkodfn
warning: no previously-included files matching '*' found under directory 'docs/_build'
psutil/_psutil_posix.c: In function ‘psutil_convert_ipaddr’:
psutil/_psutil_posix.c:141:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (n = 0; n < len; ++n) {
^
zip_safe flag not set; analyzing archive contents...
psutil.__pycache__._psutil_linux.cpython-35: module references __file__
psutil.__pycache__.__init__.cpython-35: module references __file__
psutil.__pycache__._psutil_posix.cpython-35: module references __file__
psutil.tests.__pycache__.test_system.cpython-35: module references __file__
psutil.tests.__pycache__.test_memory_leaks.cpython-35: module references __file__
psutil.tests.__pycache__.test_windows.cpython-35: module references __file__
psutil.tests.__pycache__.test_bsd.cpython-35: module references __file__
psutil.tests.__pycache__.test_osx.cpython-35: module references __file__
psutil.tests.__pycache__.__init__.cpython-35: module references __file__
psutil.tests.__pycache__.test_linux.cpython-35: module references __file__
psutil.tests.__pycache__.runner.cpython-35: module references __file__
psutil.tests.__pycache__.test_posix.cpython-35: module references __file__
psutil.tests.__pycache__.test_misc.cpython-35: module references __file__
psutil.tests.__pycache__.test_sunos.cpython-35: module references __file__
psutil.tests.__pycache__.test_process.cpython-35: module references __file__
creating /home/shared/miniconda3/lib/python3.5/site-packages/psutil-4.1.0-py3.5-linux-x86_64.egg
Extracting psutil-4.1.0-py3.5-linux-x86_64.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding psutil 4.1.0 to easy-install.pth file
Installed /home/shared/miniconda3/lib/python3.5/site-packages/psutil-4.1.0-py3.5-linux-x86_64.egg
Searching for kombu<3.1,>=3.0.34
Reading https://pypi.python.org/simple/kombu/
Best match: kombu 3.0.35
Downloading https://pypi.python.org/packages/source/k/kombu/kombu-3.0.35.tar.gz#md5=6483ac8ba7109ec606f5cb9bd084b6ef
Processing kombu-3.0.35.tar.gz
Writing /tmp/easy_install-f5pxc10s/kombu-3.0.35/setup.cfg
Running kombu-3.0.35/setup.py -q bdist_egg --dist-dir /tmp/easy_install-f5pxc10s/kombu-3.0.35/egg-dist-tmp-zv8qyp5j
warning: no files found matching 'README'
creating /home/shared/miniconda3/lib/python3.5/site-packages/kombu-3.0.35-py3.5.egg
Extracting kombu-3.0.35-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding kombu 3.0.35 to easy-install.pth file
Installed /home/shared/miniconda3/lib/python3.5/site-packages/kombu-3.0.35-py3.5.egg
Searching for billiard<3.4,>=3.3.0.23
Reading https://pypi.python.org/simple/billiard/
Best match: billiard 3.3.0.23
Downloading https://pypi.python.org/packages/source/b/billiard/billiard-3.3.0.23.tar.gz#md5=6ee416e1e7c8d8164ce29d7377cca6a4
Processing billiard-3.3.0.23.tar.gz
Writing /tmp/easy_install-69tb12_3/billiard-3.3.0.23/setup.cfg
Running billiard-3.3.0.23/setup.py -q bdist_egg --dist-dir /tmp/easy_install-69tb12_3/billiard-3.3.0.23/egg-dist-tmp-qat4h0jm
warning: no files found matching '*.py' under directory 'Lib'
creating /home/shared/miniconda3/lib/python3.5/site-packages/billiard-3.3.0.23-py3.5.egg
Extracting billiard-3.3.0.23-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding billiard 3.3.0.23 to easy-install.pth file
Installed /home/shared/miniconda3/lib/python3.5/site-packages/billiard-3.3.0.23-py3.5.egg
Searching for pytz>dev
Reading https://pypi.python.org/simple/pytz/
Best match: pytz 2016.3
Downloading https://pypi.python.org/packages/3.5/p/pytz/pytz-2016.3-py3.5.egg#md5=6d80e9d99be5cd311a752b8ba83bcbf7
Processing pytz-2016.3-py3.5.egg
Moving pytz-2016.3-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding pytz 2016.3 to easy-install.pth file
Installed /home/shared/miniconda3/lib/python3.5/site-packages/pytz-2016.3-py3.5.egg
Searching for amqp<2.0,>=1.4.9
Reading https://pypi.python.org/simple/amqp/
Best match: amqp 1.4.9
Downloading https://pypi.python.org/packages/source/a/amqp/amqp-1.4.9.tar.gz#md5=df57dde763ba2dea25b3fa92dfe43c19
Processing amqp-1.4.9.tar.gz
Writing /tmp/easy_install-_mhz9mth/amqp-1.4.9/setup.cfg
Running amqp-1.4.9/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_mhz9mth/amqp-1.4.9/egg-dist-tmp-1pi7fq1e
creating /home/shared/miniconda3/lib/python3.5/site-packages/amqp-1.4.9-py3.5.egg
Extracting amqp-1.4.9-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding amqp 1.4.9 to easy-install.pth file
Installed /home/shared/miniconda3/lib/python3.5/site-packages/amqp-1.4.9-py3.5.egg
Searching for anyjson>=0.3.3
Reading https://pypi.python.org/simple/anyjson/
Best match: anyjson 0.3.3
Downloading https://pypi.python.org/packages/source/a/anyjson/anyjson-0.3.3.tar.gz#md5=2ea28d6ec311aeeebaf993cb3008b27c
Processing anyjson-0.3.3.tar.gz
Writing /tmp/easy_install-hi6gneby/anyjson-0.3.3/setup.cfg
Running anyjson-0.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hi6gneby/anyjson-0.3.3/egg-dist-tmp-wz0jo_ef
creating /home/shared/miniconda3/lib/python3.5/site-packages/anyjson-0.3.3-py3.5.egg
Extracting anyjson-0.3.3-py3.5.egg to /home/shared/miniconda3/lib/python3.5/site-packages
Adding anyjson 0.3.3 to easy-install.pth file
Installed /home/shared/miniconda3/lib/python3.5/site-packages/anyjson-0.3.3-py3.5.egg
Searching for PyYAML==3.11
Best match: PyYAML 3.11
Adding PyYAML 3.11 to easy-install.pth file
Using /home/shared/miniconda3/lib/python3.5/site-packages
Finished processing dependencies for sos==0.5.6
from sos.
I tried to move version information to a separate file and exec
it from within setup.py
. Is this helpful?
from sos.
Yes that seems to work. I've updated setup.py. We can worry about it when setuptools officially retires.
from sos.
Great. Thanks. Close the ticket for now.
from sos.
Related Issues (20)
- Combined use of -r and -q
- Singularity exec vs run HOT 6
- bug found in entrypoint version HOT 1
- Installing sos into the tljh HOT 1
- Singularity clear environment when execute containers HOT 7
- Singularity to recognize `oras://` HOT 5
- SoS Not Registering My Alias for Singularity HOT 5
- Retain the structure of variable for `input` grouping HOT 3
- tasks fails with `bash` is not defined
- Change the destination of where failed script is written to HOT 19
- Alternative task_template?
- Only works with nbclassic? HOT 1
- Requiring shared directory for remote execution of tasks HOT 3
- Remove `R` etc from sos namespace HOT 2
- tests hang due to clean up issues HOT 1
- subclass pathlib.Path for path
- Using a sos namespace
- SoS is broken on Python 3.12? HOT 6
- Outdated SoS conda packages HOT 13
- Documentation Typo: Uisng the markdown kernel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sos.