Skip to content

Conversation

@Shaofanl
Copy link

@Shaofanl Shaofanl commented Aug 9, 2015

Changes:

  • Using sys.platform to determine the platform is more professional and more common in Python setup than using platform.system(). For more details: When to use os.name, sys.platform, or platform.system?
  • Also I raise an exception when the platform is not supported. (When installed on an unsupported platform, the original setup will show NameError: name 'package_data' is not defined, which is quite confusing.)
  • I add the support on Linux and Cygwin.

Things that I don't know how to fix:

  • After modifying setup.py, I use python setup.py install on both Linux and Cygwin. And I can see the installation works (I will show the result on cygwin, which is similar to the result on Linux):

running install
running bdist_egg
running egg_info
creating pySBOL.egg-info
writing pySBOL.egg-info/PKG-INFO
writing top-level names to pySBOL.egg-info/top_level.txt
writing dependency_links to pySBOL.egg-info/dependency_links.txt
writing manifest file 'pySBOL.egg-info/SOURCES.txt'
reading manifest file 'pySBOL.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pySBOL.egg-info/SOURCES.txt'
installing library code to build/bdist.cygwin-2.0.4-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/sbol
copying sbol/sbol.py -> build/lib/sbol
copying sbol/sbol_test.py -> build/lib/sbol
copying sbol/init.py -> build/lib/sbol
creating build/lib/sbol/examples
copying sbol/examples/inspect_sbol_file.py -> build/lib/sbol/examples
copying sbol/examples/test.xml -> build/lib/sbol/examples
creating build/bdist.cygwin-2.0.4-x86_64
creating build/bdist.cygwin-2.0.4-x86_64/egg
creating build/bdist.cygwin-2.0.4-x86_64/egg/sbol
creating build/bdist.cygwin-2.0.4-x86_64/egg/sbol/examples
copying build/lib/sbol/examples/inspect_sbol_file.py -> build/bdist.cygwin-2.0.4-x86_64/egg/sbol/examples
copying build/lib/sbol/examples/test.xml -> build/bdist.cygwin-2.0.4-x86_64/egg/sbol/examples
copying build/lib/sbol/sbol.py -> build/bdist.cygwin-2.0.4-x86_64/egg/sbol
copying build/lib/sbol/sbol_test.py -> build/bdist.cygwin-2.0.4-x86_64/egg/sbol
copying build/lib/sbol/init.py -> build/bdist.cygwin-2.0.4-x86_64/egg/sbol
byte-compiling build/bdist.cygwin-2.0.4-x86_64/egg/sbol/examples/inspect_sbol_file.py to inspect_sbol_file.pyc
byte-compiling build/bdist.cygwin-2.0.4-x86_64/egg/sbol/sbol.py to sbol.pyc
byte-compiling build/bdist.cygwin-2.0.4-x86_64/egg/sbol/sbol_test.py to sbol_test.pyc
byte-compiling build/bdist.cygwin-2.0.4-x86_64/egg/sbol/init.py to init.pyc
creating build/bdist.cygwin-2.0.4-x86_64/egg/EGG-INFO
copying pySBOL.egg-info/PKG-INFO -> build/bdist.cygwin-2.0.4-x86_64/egg/EGG-INFO
copying pySBOL.egg-info/SOURCES.txt -> build/bdist.cygwin-2.0.4-x86_64/egg/EGG-INFO
copying pySBOL.egg-info/dependency_links.txt -> build/bdist.cygwin-2.0.4-x86_64/egg/EGG-INFO
copying pySBOL.egg-info/top_level.txt -> build/bdist.cygwin-2.0.4-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/pySBOL-1.0.0b1-py2.7.egg' and adding 'build/bdist.cygwin-2.0.4-x86_64/egg' to it
removing 'build/bdist.cygwin-2.0.4-x86_64/egg' (and everything under it)
Processing pySBOL-1.0.0b1-py2.7.egg
Removing /usr/lib/python2.7/site-packages/pySBOL-1.0.0b1-py2.7.egg
Copying pySBOL-1.0.0b1-py2.7.egg to /usr/lib/python2.7/site-packages
pySBOL 1.0.0b1 is already the active version in easy-install.pth
Installed /usr/lib/python2.7/site-packages/pySBOL-1.0.0b1-py2.7.egg
Processing dependencies for pySBOL==1.0.0b1
Finished processing dependencies for pySBOL==1.0.0b1

But when I import the sbol from python, I got:

Traceback (most recent call last):
File "", line 1, in
File "build/bdist.cygwin-2.0.4-x86_64/egg/sbol/init.py", line 3, in
File "build/bdist.cygwin-2.0.4-x86_64/egg/sbol/sbol.py", line 17, in
ImportError: No module named libsbol

I guess the libsbol is not installed correctly. Hope you can work it out. Otherwise just remove the linux2 and cygwin support in setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant