-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bin/omero entrypoint #229
bin/omero entrypoint #229
Conversation
So tests are certainly running on travis. It'd be good to review that |
Changes (with ignore whitespace) all look good. |
Testing on Windows10 VM.
|
Looks like def readlink(file=sys.argv[0]):
"""
Resolve symlinks and similar. This is useful to allow
linking this file under /usr/bin/, for example.
"""
import stat
file = sys.argv[0]
while stat.S_ISLNK(os.lstat(file)[stat.ST_MODE]): #### Failing on this line
target = os.readlink(file)
if target[0] != "/":
file = os.path.join(os.path.dirname(file), target)
else:
file = target
file = os.path.abspath(file)
return file exe = readlink()
top = os.path.join(exe, os.pardir, os.pardir)
#
# This list needs to be kept in line with omero.cli.CLI._env
#
top = os.path.normpath(top)
var = os.path.join(top, "var")
vlb = os.path.join(var, "lib")
sys.path.append(vlb) @joshmoore Is it safe to remove, on the assumption that |
It's similar to OMERO_HOME in that it will be the removal of a little known feature, but a removal nonetheless. |
If I'm reading the code correctly, assuming
What's the expected use of |
Dim memory of a place to put libs for scripts? |
This is now working on Windows, I've tested it in a VM with There are still loads of other warnings/errors since Windows isn't (yet) properly supported by omero-py. |
👍
|
Conflicting PR. Removed from build OMERO-python-superbuild-push#365. See the console output for more details.
--conflicts |
Conflicting PR. Removed from build OMERO-python-superbuild-push#366. See the console output for more details.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes all look good to me.
Closes #219
Converts
bin/omero
into an entrypoint (cross-platform, so*.bat
files are no longer needed).Testing:
omero
CLI should work as before.There are probably loads of other cleanups that could be done such as removing the path detection (
sys.path.append(vlb)
) now thatOMERODIR
is required for anything server side, but I've tried to keep the changes minimal for now.bin/omero
was renamed tosrc/omero/main.py
, it looks like a new file because I had to wrap most of the script in amain()
function but it's mostly indentation and flake8 fixes.Could do with someone testing this on Windows