Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ORG.Asm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ORG.Asm
ORG.Asm
Commits
02d33a54
Commit
02d33a54
authored
Aug 14, 2015
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch few bug related to the new version of cython + intallation
problems
parent
bb49bc25
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
58 deletions
+29
-58
distutils.ext/obidistutils/command/install.py
distutils.ext/obidistutils/command/install.py
+1
-1
distutils.ext/obidistutils/serenity/__init__.py
distutils.ext/obidistutils/serenity/__init__.py
+0
-1
distutils.ext/obidistutils/serenity/checkpackage.py
distutils.ext/obidistutils/serenity/checkpackage.py
+7
-3
get_orgasm/get-orgasm.py
get_orgasm/get-orgasm.py
+13
-46
python/orgasm/assembler/_assembler.pyx
python/orgasm/assembler/_assembler.pyx
+1
-1
python/orgasm/multialign/_dynamic.pyx
python/orgasm/multialign/_dynamic.pyx
+1
-1
python/orgasm/multialign/_multi.pyx
python/orgasm/multialign/_multi.pyx
+1
-1
python/orgasm/version.py
python/orgasm/version.py
+2
-2
requirements.txt
requirements.txt
+3
-2
No files found.
distutils.ext/obidistutils/command/install.py
View file @
02d33a54
...
...
@@ -3,8 +3,8 @@ Created on 6 oct. 2014
@author: coissac
'''
from
distutils.command.install
import
install
as
install_ori
#from setuptools.command.install import install as install_ori
class
install
(
install_ori
):
...
...
distutils.ext/obidistutils/serenity/__init__.py
View file @
02d33a54
...
...
@@ -108,6 +108,5 @@ def serenity_mode(package,version):
def
getVersion
(
source
,
main
,
version
):
path
=
os
.
path
.
join
(
source
,
main
,
'%s.py'
%
version
)
spec
=
spec_from_file_location
(
'version'
,
path
)
print
(
spec
.
loader
)
return
spec
.
loader
.
load_module
().
version
.
strip
()
distutils.ext/obidistutils/serenity/checkpackage.py
View file @
02d33a54
...
...
@@ -83,6 +83,8 @@ def install_requirements(requirementfile='requirements.txt'):
log
.
info
(
" Installing requirement : %s"
%
x
)
pip_install_package
(
x
)
install_something
=
True
if
x
[
0
:
3
]
==
'pip'
:
return
True
return
install_something
...
...
@@ -134,7 +136,9 @@ def get_package_requirement(package,requirementfile='requirements.txt'):
def
pip_install_package
(
package
,
directory
=
None
,
upgrade
=
True
):
log
.
info
(
'installing %s in directory %s'
%
(
package
,
str
(
directory
)))
if
directory
is
not
None
:
log
.
info
(
' installing %s in directory %s'
%
(
package
,
str
(
directory
)))
if
'http_proxy'
in
os
.
environ
and
'https_proxy'
not
in
os
.
environ
:
os
.
environ
[
'https_proxy'
]
=
os
.
environ
[
'http_proxy'
]
...
...
@@ -144,8 +148,8 @@ def pip_install_package(package,directory=None,upgrade=True):
if
upgrade
:
args
.
append
(
'--upgrade'
)
if
'http_proxy'
in
os
.
environ
:
args
.
append
(
'--proxy=%s'
%
os
.
environ
[
'http_proxy'
])
if
'http
s
_proxy'
in
os
.
environ
:
args
.
append
(
'--proxy=%s'
%
os
.
environ
[
'http
s
_proxy'
])
if
directory
is
not
None
:
args
.
append
(
'--target=%s'
%
directory
)
...
...
get_orgasm/get-orgasm.py
View file @
02d33a54
...
...
@@ -4,7 +4,7 @@ from fileinput import filename
SOFT = "Org.Asm"
LIB = "orgasm"
PIP_MINVERSION = '1.5'
MODE = "
svn" # or "pypi
"
MODE = "
pypi" # or "svn
"
SVNURL = "http://www.grenoble.prabi.fr/public-svn/LECASofts/orgasm/trunk"
...
...
@@ -37280,7 +37280,7 @@ import os.path
import shutil
import sys
import tempfile
import urllib
2
import urllib
.request, urllib.error, urllib.parse
import imp
import zipimport
import importlib
...
...
@@ -37288,6 +37288,7 @@ import glob
import tarfile
import pkgutil
import stat
import pip
from distutils.errors import DistutilsError
from distutils.version import StrictVersion
...
...
@@ -37320,55 +37321,22 @@ def installModules():
sys.path.insert(0,install_zip)
except:
print
>>sys.stderr,'Unable to install %s on your system' % SOFT
print
('Unable to install %s on your system' % SOFT, file=sys.stderr)
def cleanModules():
if tmpdir:
shutil.rmtree(tmpdir[0], ignore_errors=True)
def is_pip_installed(minversion=PIP_MINVERSION):
try:
import pip # @UnresolvedImport
print pip.__file__
ok = StrictVersion(pip.__version__) >= StrictVersion(minversion)
except:
ok = False
return ok
def get_a_pip_module(minversion=PIP_MINVERSION):
global local_pip
tmpdir = getTmpDir()
if not local_pip:
pipmodule = importlib.import_module('pip')
# Prepare the CERT certificat for https download
cert_path = os.path.join(tmpdir, "cacert.pem")
with open(cert_path, "wb") as cert:
cert.write(pkgutil.get_data("pip._vendor.requests", "cacert.pem"))
os.environ.setdefault("PIP_CERT", cert_path)
local_pip.append(pipmodule)
return local_pip[0]
def pip_download_package(package,pip=None):
def pip_download_package(package):
tmpdir = getTmpDir()
if pip is None:
pip = get_a_pip_module()
args = ['install']
if 'http_proxy' in os.environ:
if 'http_proxy' in os.environ and 'https_proxy' not in os.environ:
os.environ['https_proxy']=os.environ['http_proxy']
if 'https_proxy' in os.environ:
args.append('--proxy=%s' % os.environ['http_proxy'])
args.append('--download=%s' % tmpdir)
...
...
@@ -37405,8 +37373,7 @@ def svndownload():
def pypidownload():
global SOFT
pip = get_a_pip_module()
filename=pip_download_package(SOFT,pip=pip)
filename=pip_download_package(SOFT)
return filename
...
...
@@ -37439,9 +37406,9 @@ def main():
activate = os.path.join(current,LIB)
with open(activate,"w") as fp:
print
>>fp, install_script % (virtualenvname,SOFT,SOFT
)
print
>>fp
print
(install_script % (virtualenvname,SOFT,SOFT),file=fp
)
print
(file=fp)
st = os.stat(activate)
os.chmod(activate, st.st_mode | stat.S_IEXEC)
python/orgasm/assembler/_assembler.pyx
View file @
02d33a54
...
...
@@ -148,7 +148,7 @@ cdef bint isPalindrome(list path):
if
(
lp
&
1
)
==
1
:
return
False
for
i
in
range
(
lp
/
2
):
for
i
in
range
(
lp
/
/
2
):
if
path
[
i
]
!=-
path
[
-
i
-
1
]:
return
False
...
...
python/orgasm/multialign/_dynamic.pyx
View file @
02d33a54
...
...
@@ -66,7 +66,7 @@ cdef void reversePath(alignPath* path):
cdef
long
j
j
=
path
.
length
for
i
in
range
(
path
.
length
/
2
):
for
i
in
range
(
path
.
length
/
/
2
):
j
-=
1
path
.
path
[
i
],
path
.
path
[
j
]
=
path
.
path
[
j
],
path
.
path
[
i
]
...
...
python/orgasm/multialign/_multi.pyx
View file @
02d33a54
...
...
@@ -188,7 +188,7 @@ cdef list alignReads(readids,Index index,size_t kmer=12,int smin=10,size_t delta
seqs
=
list
(
unique
)
# nseq = len(readids)
nseq
=
len
(
seqs
)
nali
=
nseq
*
(
nseq
-
1
)
/
2
nali
=
nseq
*
(
nseq
-
1
)
/
/
2
hashes
=
[
hashSeq
(
s
,
kmer
)
for
s
in
seqs
]
progressBar
(
1
,
nali
,
reset
=
True
,
head
=
bytes
(
"Pairwise alignment %6d x %6d "
%
(
0
,
0
),
encoding
=
'ascii'
))
...
...
python/orgasm/version.py
View file @
02d33a54
major
=
0
minor
=
0
minor
=
'0a4'
serial
=
'alpha'
version
=
"%2d.%
02d.%s"
%
(
major
,
minor
,
serial
)
version
=
"%2d.%
s"
%
(
major
,
minor
)
requirements.txt
View file @
02d33a54
--extra-index-url https://pypi.python.org/simple/
Cython
>=0.21
Sphinx
>=1.2.0
pip
>=7.1
Cython
>=0.22
Sphinx
>=1.3.1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment