Author SHA1 Message Date
abonin 22f98eaa4b switch to the new version 1.2.7 2016-07-06 14:50:56 +02:00
abonin 38504ab03a Final switch to the new cython interface on array.array 2016-07-06 14:46:31 +02:00
abonin 1b8a867fbf switch to the new cython interface to array.array 2016-07-06 14:29:43 +02:00
abonin 9a9bd6c60f switch to the new cython interface to array.array 2016-07-06 14:23:58 +02:00
abonin 6002fbaa98 Remove the reference to arrayarray.h 2016-07-06 14:12:56 +02:00
Aurélie Bonin e869e16d9f Adaptation for running with cygwin on windows platform 2016-07-06 11:55:32 +02:00
Aurélie Bonin 3a5ad68013 A very small fastq test file 2016-07-06 11:52:55 +02:00
coissac b8dc49ef84 Rename members of the DNA profil strucuture to potentiel avoid a compile
bug on windows cygwin
2016-06-28 15:13:30 +02:00
coissac 140f26977a Merge branch 'master' of git@git.metabarcoding.org:obitools/obitools.git 2016-06-28 15:10:39 +02:00
coissac d96cf37147 Remove a debug trace in the installer 2016-06-28 15:10:12 +02:00
Celine Mercier 20f1c1d337 Fixed a potential bug with the parsing of taxonomic paths when using
obitaxonomy after obiaddtaxids on a general UNITE database
2016-06-16 16:40:27 +02:00
coissac f32ca9e9fa Patch the obitool url on metabarcoding.org 2016-05-27 14:37:58 +02:00
coissac a06e79102d Switch to version 1.2.6 2016-05-27 12:56:14 +02:00
coissac 0e2c486178 Merge branch 'master' of git@git.metabarcoding.org:obitools/obitools.git 2016-05-27 12:52:04 +02:00
Celine Mercier 950bae882b Numbering version 1.2.5 2016-05-27 11:20:27 +02:00
Celine Mercier 683f3b5bbc Merge branch 'master' of git@git.metabarcoding.org:obitools/obitools.git 2016-05-26 16:01:03 +02:00
Celine Mercier 5490144788 Fixed a bug in obitaxonomy sometimes triggering an error when adding a
new taxon from a file. Also now checks if taxon already in taxonomy.
2016-05-26 15:58:48 +02:00
coissac 42a3f98495 for cython to version 0.23.5 the latest 0.23 version 2016-04-07 12:19:42 +02:00
coissac c395d76231 patch a bug in the sequence counting of obiselect 2016-04-06 14:46:08 +02:00
coissac b2d2346eb7 Set the Cython required version to 0.23 because of a bug in the 0.24
version
2016-04-06 14:44:17 +02:00
coissac ffb33f61a9 Switch to version 1.2.3 2016-04-04 18:49:10 +02:00
Celine Mercier adbeac9684 Fixed major bug with -f UNITE_FULL option of obiaddtaxids 2016-04-04 16:36:05 +02:00
Celine Mercier 4aac47e639 Merge branch 'master' of git.metabarcoding.org:obitools/obitools 2016-03-30 16:35:49 +02:00
Celine Mercier 2028c69b3f Fixed typo in obiaddtaxids documentation 2016-03-17 15:05:18 +01:00
coissac 2649cd268c Switch to version 1.2.2 2016-01-12 20:57:47 +01:00
coissac 46b446f0c8 Add capacity to filter on merged sequences 2016-01-12 20:53:56 +01:00
Celine Mercier 6208cbee02 Fixes #20 and several other bugs related to that function 2016-01-08 11:40:39 +01:00
coissac 1d4c3f99b2 Patch a bug related to the -E et -M options 2015-10-27 20:16:07 +01:00
coissac ba30e74dc9 Switch the version number to 1.2.1 2015-10-27 18:59:51 +01:00
coissac 0e8b97ca40 Modify the action of the -M option to fit the documentation 2015-10-27 18:58:32 +01:00
coissac a95ae5126b Change the ecotag doc according to the new -M option 2015-10-27 18:56:49 +01:00
coissac 0e2f859839 Patch bug in the -E option of ecotag and add the -M option to limit the
action of the -E option
2015-10-27 18:48:03 +01:00
coissac 23717f5833 Add a first version of the obisubset tool and tag the version 1.2.0 2015-10-20 22:02:02 +02:00
coissac fdeaf5956c Change the way ecoPCRDB are written by obitools. If the obitools is
called with several sequence files as input when the ecoPCRDB is
requested as output format, the sequences are splitted in several sdx
files
2015-10-02 16:36:25 +02:00
coissac 343d9ec6df Switch to version 1.1.22 2015-08-03 23:16:37 +02:00
coissac 7a993ec841 Patch a wrong import in the file 2015-08-03 23:14:13 +02:00
celinemercier 6170fac081 fixed a problem with the progress bar in obiselect when there is more
than one category
2015-07-20 15:24:30 +02:00
coissac 764ee27c0d Switch to the version 1.1.21 2015-07-13 15:31:20 +02:00
coissac 18d87aa1b1 Add a small work around patch for the --skip and --only options in
illuminapairedend
2015-07-11 23:38:47 +02:00
coissac 1c91c27ee3 Tag the version 1.1.20 2015-07-03 14:57:24 +02:00
coissac 22d343b46a Patch two small print bug in the new ecotag 2015-07-03 14:55:44 +02:00
coissac 2af94b9da7 Add docuentation for the new options and an option to manage the ecotag
cache size
2015-07-03 10:39:59 +02:00
coissac aa064dda57 Add two general options for limiting the analysis of a file to only a
sub-part of the data:

   - --skip <N>
   - --only <N>
   
They respectively allow to first skip the N first sequences, and to
analysize only the <N> next sequences.
2015-07-03 09:10:49 +02:00
coissac f38ccae698 Add a --minimum-circle option to ecotag and a cache on the self
alignment scores of 1000000 of pairwise scores
2015-07-02 16:14:22 +02:00
Celine Mercier b99881817a Closes #9 : adds a parser in obiaddtaxids for the UNITE 'general FASTA
release' format
2015-06-12 15:08:58 +02:00
Celine Mercier df093b3fa9 updated the UNITE parser of obiaddtaxids 2015-06-11 17:47:00 +02:00
coissac 9ba67985e9 Switch to the 1.1.18 version 2015-06-02 16:01:16 +02:00
coissac f74aeff002 Merge branch 'master' of git@git.metabarcoding.org:obitools/obitools.git 2015-06-02 15:59:57 +02:00
coissac b9fa718a2c tag the 1.1.17 version 2015-06-02 15:53:41 +02:00
coissac 51a7ecde21 Patch the installer 2015-06-02 15:52:18 +02:00
Celine Mercier 6bf6cc6612 fixing a documentation problem (issue #3) 2015-06-01 14:11:11 +02:00
Celine Mercier 191af9669a modified the obisilva script to deal with version names containing dots,
e.g. "119.1"
2015-06-01 14:07:19 +02:00
Celine Mercier 429fbbb61b switching branch OBITools-1.01 to master 2015-06-01 10:41:26 +02:00
Celine Mercier 18c3a7dc08 Fixes #3 2015-05-22 18:00:13 +02:00
coissac 83b60ab7b0 Switch to version 1.1.16 2015-04-28 13:54:32 +00:00
coissac 8f61723141 Patch a bug in the getTaxid function 2015-04-28 13:52:19 +00:00
coissac 21ac43ca12 2015-04-16 13:59:12 +00:00
coissac 6be099b885 2015-04-16 13:06:56 +00:00
coissac 37d24febd2 2015-04-16 13:05:21 +00:00
coissac ee1063ed28 2015-04-16 12:42:46 +00:00
coissac 6bd5407a13 2015-04-16 12:42:11 +00:00
coissac dd5fbb0246 2015-04-16 12:41:43 +00:00
coissac 3a82469281 Use setuptools instead of distutils as much as possible 2015-04-16 09:32:07 +00:00
coissac edfa796c83 Resolve dependency with cython by making a temporary install if needed 2015-04-16 08:52:30 +00:00
coissac 704dbd50c8 Switch to version 1.1.6 2015-04-15 16:10:57 +00:00
coissac bd32b9f4e6 Switch to version 1.1.6 2015-04-15 16:10:18 +00:00
coissac 4547dd490b Add a local copy of setuptools 2015-04-15 16:09:25 +00:00
coissac 48dc9497d4 Try to solve dependencies with sphinx at the first install 2015-04-15 16:08:36 +00:00
coissac 2614654b41 Change the install documentation 2015-03-21 19:28:45 +00:00
coissac 6bfec50f25 Debug the reading of gziped files, change the doc of obipr2 and obisilva 2015-03-21 17:58:45 +00:00
coissac 28dad843f1 2015-03-14 15:55:19 +00:00
coissac 230be1c08b Add dependency to ipython 2015-03-10 15:36:17 +00:00
coissac 1ca1fa0b03 Switch to the version 1.1.2
Add the exports of the doc in html epub and man pages
Modify the obitool script to setup the path to export/bin
2015-03-10 15:11:40 +00:00
coissac 9fa9d23c15 Switch to the version 1.1.2
Add the exports of the doc in html epub and man pages
Modify the obitool script to setup the path to export/bin
2015-03-10 15:10:53 +00:00
Céline Mercier bb4170dfdd in obitaxonomy, fixed a typo, and a problem when adding taxa from a file with an associated path 2015-03-06 16:20:01 +00:00
coissac 9893dba6f6 2015-03-05 18:40:29 +00:00
coissac 173dde2857 New realease of obitools including a first version of obipr2 and obisilva 2015-03-05 17:04:05 +00:00
coissac 49e3eb3c77 Switch to the version 1.1 of obitools 2015-03-02 13:41:31 +00:00
Céline Mercier f40c2f5245 in obitaxonomy, fixed a problem when adding taxa from file with an associated path 2015-02-23 14:02:31 +00:00
coissac c0eb996dd3 Create a new major version 2015-02-20 19:31:31 +00:00
Frédéric Boyer f596d3a4fb [ADD] order in location 2014-10-21 10:32:44 +00:00
Frédéric Boyer 4de712702d Bug sur merged_KEY lorsque la merged_KEY existe deja dans les sequences : la somme n'etait pas effectuee correctement 2014-09-30 09:21:32 +00:00
Frédéric Boyer 1dad3bf086 -r option fix 2014-05-15 14:41:16 +00:00
Frédéric Boyer b25091e8b0 Bug à l'affichage au chargement de la taxonomie 2014-04-30 15:04:23 +00:00
Frédéric Boyer a664ea5d77 assertion failed with progress bar when empty file 2014-04-25 08:51:17 +00:00
coissac a9a86d1067 remove memory leak 2014-04-23 14:00:48 +00:00
coissac 5a6c4d231c 2014-04-23 12:35:54 +00:00
Frédéric Boyer 62923e1cb8 [MOD] Erreur de lecture des fichiers (standard, pas les options) 2014-04-22 22:39:23 +00:00
Frédéric Boyer d5ce87f7f8 [MOD] Corrected a bug in initialization of 'word4table' that 'coredump' on linux 2014-03-10 18:19:55 +00:00
coissac 7c55ad6d32 Patch to fit the version 0.20 of cython 2014-02-11 16:25:06 +00:00
coissac eac5bc958d Patch to fit the version 0.20 of cython 2014-02-11 16:22:28 +00:00
Frédéric Boyer 847284267e 2014-01-31 16:51:20 +00:00
Frédéric Boyer 105cb4c8be 2014-01-31 16:45:18 +00:00
Frédéric Boyer acad67c67f 2014-01-31 16:26:44 +00:00
Frédéric Boyer 4daec682ff 2014-01-31 16:18:31 +00:00
Frédéric Boyer b09f7b4ef4 2014-01-31 10:39:48 +00:00
Frédéric Boyer 8b00463558 2014-01-31 10:32:21 +00:00
coissac bd75660e3d 2014-01-31 09:29:36 +00:00
Frédéric Boyer 2d432e1d51 doc 2014-01-30 16:20:36 +00:00
coissac 2f6c3c05db Change the name of the tags forward_primer and reverse_primer used in ecoPCR file conversion to forward_match and reverse_match to conform with names used in ngsfilter 2014-01-30 10:39:01 +00:00
Céline Mercier 4e22703ddb fixed spelling mistake 2013-12-10 13:59:51 +00:00
coissac 0675ea6770 Patch a bug related to the -n option of obitab 2013-12-10 08:11:07 +00:00
Frédéric Boyer f3d52f1007 [DOC] 2013-12-04 14:54:09 +00:00
Frédéric Boyer 9ae4a1b4c4 [MOD] direct_tag replaced by forward_tag 2013-12-04 13:41:31 +00:00
Frédéric Boyer a938c9bdc2 2013-12-04 11:02:02 +00:00
Frédéric Boyer 514cd02210 [MOD] nqual and junction removed 2013-12-04 11:00:27 +00:00
Frédéric Boyer f2f8d8805c 2013-12-04 10:18:00 +00:00
Céline Mercier f355cc7a9f 2013-11-20 15:42:07 +00:00
Frédéric Boyer 608db8b1c0 [MOD] removed a print 2013-11-15 21:53:40 +00:00
coissac 47e6b4108c New version of obiclean with clustering options 2013-11-14 15:03:11 +00:00
Frédéric Boyer 5917031d61 [MOD] now handle dictionaries, in such case, sequences can then be found in several files named after the keys of the dictionary 2013-11-05 14:14:24 +00:00
coissac 411c5134ae Path 2 error in the option helps 2013-10-29 14:02:24 +00:00
Céline Mercier 22217920a5 fixed obiaddtaxids bug 2013-10-24 14:32:27 +00:00
Céline Mercier 621b499cb8 fixed obitaxonomy bug 2013-10-24 13:32:44 +00:00
Céline Mercier 2e18284dc0 fixed obitaxonomy bug 2013-10-24 13:29:20 +00:00
Céline Mercier fc5d914093 obiaddtaxids now handle homonymes 2013-10-24 12:55:46 +00:00
Céline Mercier 7a7ee58a51 taxonomy databases now handle homonymes 2013-10-24 12:15:00 +00:00
Céline Mercier 82d92f8497 commented )D option in obitaxonomy because it doesn't work 2013-10-18 12:03:49 +00:00
Céline Mercier 47920a4687 obitaxonomy now checks if taxon already exists under the specific ancestor + changed -A option: if genus already existing it MUST be under restricting ancestor + fixed minor bug 2013-10-16 13:53:16 +00:00
coissac 12c080d7f4 rename --rank option to --seq-rank option 2013-09-19 01:58:11 +00:00
Céline Mercier 7b3886974d better handling of options in obiaddtaxids 2013-09-10 09:57:34 +00:00
Céline Mercier 0686029075 -w option in obitaxonomy 2013-09-04 12:07:16 +00:00
Céline Mercier ca36a4fbfe fixed bug 2013-09-04 10:28:56 +00:00
Céline Mercier cbf007b5a9 -w option in obitaxonomy 2013-09-04 10:27:02 +00:00
Céline Mercier 7e8835295a figuring out a bug 2013-09-04 10:11:10 +00:00
Céline Mercier e3aaa53be1 removed a print 2013-09-04 10:00:20 +00:00
Céline Mercier fbdf0db3c5 changed the UNITE parser in obiaddtaxids to remove empty fields ('-') 2013-09-04 09:46:26 +00:00
Frédéric Boyer 3b10f97587 [MOD] updated doc 2013-08-01 15:11:38 +00:00
coissac ff287fc31d Patch variance estimator for returning 0 for singleton 2013-06-22 08:31:52 +00:00
coissac 3cea0f40fe patch a bug in obisample on the sampling with replacement method 2013-06-18 08:42:48 +00:00
coissac 7bf04063f8 add doc to the manifest 2013-05-20 10:12:31 +00:00
524 changed files with 119481 additions and 38942 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OBITools</name>
<name>OBITools-1.1</name>
<comment></comment>
<projects>
</projects>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/OBITools-1.0/src</path>
<path>/obitools/src</path>
<path>/${PROJECT_DIR_NAME}/distutils.ext</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+2 -1
View File
@@ -1,7 +1,8 @@
include setup.py
recursive-include distutils.ext *.py *.c
recursive-include distutils.ext *.py *.c *.pem
recursive-include src *.pyx *.pxd *.c *.h *.cfiles
recursive-include doc/sphinx/source *.txt *.rst *.py
recursive-include doc/sphinx/sphinxext *.py
include doc/sphinx/make.bat
include doc/sphinx/Makefile
include README.txt
+11 -1
View File
@@ -7,6 +7,7 @@ Created on 20 oct. 2012
from distutils.command.build import build as ori_build
from obidistutils.serenity.checksystem import is_mac_system
from distutils import log
class build(ori_build):
@@ -28,10 +29,19 @@ class build(ori_build):
def has_pidname(self):
return is_mac_system()
def has_doc(self):
return True
sub_commands = [('littlebigman', has_littlebigman),
('pidname',has_pidname),
('build_ctools', has_ctools),
('build_files', has_files),
('build_cexe', has_executables)] \
+ ori_build.sub_commands
+ ori_build.sub_commands + \
[('build_sphinx',has_doc)]
def run(self):
log.info('\n\nRunning obidistutils build process\n\n')
ori_build.run(self)
@@ -4,11 +4,8 @@ Created on 20 oct. 2012
@author: coissac
'''
import os
from obidistutils.command.build_ctools import build_ctools
from distutils.sysconfig import customize_compiler
from distutils.errors import DistutilsSetupError
from distutils import log
class build_cexe(build_ctools):
@@ -4,26 +4,35 @@ Created on 13 fevr. 2014
@author: coissac
'''
from distutils import log
import sys
from obidistutils.serenity import is_serenity
import os
from obidistutils.serenity.checkpackage import install_requirements
from obidistutils.serenity.rerun import rerun_with_anothe_python
try:
from Cython.Distutils import build_ext as ori_build_ext # @UnresolvedImport
except ImportError:
from distutils.command.build_ext import build_ext as ori_build_ext
from distutils.errors import DistutilsSetupError
import os
if not is_serenity() and install_requirements():
log.info("Restarting installation with all dependencies ok")
rerun_with_anothe_python(os.path.realpath(sys.executable))
from distutils.errors import DistutilsSetupError
class build_ext(ori_build_ext):
def modifyDocScripts(self):
print >>open("doc/sphinx/build_dir.txt","w"),self.build_lib
def initialize_options(self):
ori_build_ext.initialize_options(self)
ori_build_ext.initialize_options(self) # @UndefinedVariable
self.littlebigman = None
self.built_files = None
def finalize_options(self):
ori_build_ext.finalize_options(self)
ori_build_ext.finalize_options(self) # @UndefinedVariable
self.set_undefined_options('littlebigman',
('littlebigman', 'littlebigman'))
@@ -83,10 +92,23 @@ class build_ext(ori_build_ext):
def run(self):
self.modifyDocScripts()
ori_build_ext.run(self)
ori_build_ext.run(self) # @UndefinedVariable
# from obidistutils.serenity.getcython import get_a_cython_module
# import imp
# import os.path
#
# log.info("No cython installed, try to install a temporary cython")
# cython = get_a_cython_module()
# sys.path.insert(0,os.path.dirname(os.path.dirname(cython.__file__)))
# f, filename, description=imp.find_module('Distutils',[os.path.dirname(cython.__file__)])
# submodule = imp.load_module('Cython.Distutils', f, filename, description)
# ori_build_ext = submodule.build_ext
#
@@ -0,0 +1,38 @@
'''
Created on 10 mars 2015
@author: coissac
'''
from distutils import log
from obidistutils.serenity.checkpackage import install_requirements
from obidistutils.serenity.rerun import rerun_with_anothe_python
from obidistutils.serenity import is_serenity
import os
import sys
try:
from sphinx.setup_command import BuildDoc as ori_build_sphinx
except ImportError:
if not is_serenity() and install_requirements():
log.info("Restarting installation with all dependencies ok")
rerun_with_anothe_python(os.path.realpath(sys.executable))
class build_sphinx(ori_build_sphinx):
'''
Build Sphinx documentation in html, epub and man formats
'''
description = __doc__
def run(self):
self.builder='html'
self.finalize_options()
ori_build_sphinx.run(self)
self.builder='epub'
self.finalize_options()
ori_build_sphinx.run(self)
self.builder='man'
self.finalize_options()
ori_build_sphinx.run(self)
+12 -1
View File
@@ -4,11 +4,22 @@ Created on 6 oct. 2014
@author: coissac
'''
from distutils.command.install import install as install_ori
try:
from setuptools.command.install import install as install_ori
has_setuptools=True
except ImportError:
from distutils.command.install import install as install_ori
has_setuptools=False
from distutils import log
class install(install_ori):
def __init__(self,dist):
install_ori.__init__(self, dist)
self.sub_commands.insert(0, ('build',lambda self: True))
self.sub_commands.append(('install_sphinx',lambda self: self.distribution.serenity))
def run(self):
log.info('\n\nRunning obidistutils install process\n\n')
install_ori.run(self)
@@ -3,8 +3,13 @@ Created on 20 oct. 2012
@author: coissac
'''
try:
from setuptools.command.install_scripts import install_scripts as ori_install_scripts
has_setuptools = True
except ImportError:
from distutils.command.install_scripts import install_scripts as ori_install_scripts
has_setuptools = False
from distutils.command.install_scripts import install_scripts as ori_install_scripts
import os.path
from distutils import log
@@ -13,6 +18,7 @@ class install_scripts(ori_install_scripts):
def initialize_options(self):
ori_install_scripts.initialize_options(self)
self.deprecated_scripts = None
self.public_dir = None
def revove_dot_py(self):
for filename in self.get_outputs():
@@ -28,8 +34,23 @@ class install_scripts(ori_install_scripts):
except:
log.info('Unix command %s is not present in build dir' % command)
def remove_deprecated_script(self):
def install_public_link(self):
self.mkpath(self.public_dir)
for file in self.get_outputs():
if self.dry_run:
log.info("changing mode of %s", file)
else:
log.info("exporting file %s -> %s", file,os.path.join(self.public_dir,
os.path.split(file)[1]
))
dest = os.path.join(self.public_dir,
os.path.split(file)[1]
)
if os.path.exists(dest):
os.unlink(dest)
os.symlink(file,dest)
def remove_deprecated_script(self):
if self.deprecated_scripts is not None:
for f in self.deprecated_scripts:
try:
@@ -46,8 +67,13 @@ class install_scripts(ori_install_scripts):
def run(self):
self.remove_deprecated_script()
ori_install_scripts.run(self)
if self.distribution.serenity:
self.public_dir=os.path.join(self.install_dir,"../export/bin")
self.public_dir=os.path.abspath(self.public_dir)
self.install_public_link()
self.revove_dot_py()
@@ -0,0 +1,46 @@
'''
Created on 10 mars 2015
@author: coissac
'''
from distutils.core import Command
import os.path
import glob
class install_sphinx(Command):
'''
Install the sphinx documentation
'''
description = "Install the sphinx documentation in serenity mode"
boolean_options = ['force', 'skip-build']
def initialize_options (self):
self.install_doc = None
self.build_dir = None
def finalize_options (self):
self.set_undefined_options('build_sphinx', ('build_dir', 'build_dir'))
self.set_undefined_options('install',
('install_scripts', 'install_doc'))
def run (self):
if self.distribution.serenity:
self.install_doc = os.path.join(self.install_doc,"../export/share")
self.install_doc=os.path.abspath(self.install_doc)
self.mkpath(self.install_doc)
self.mkpath(os.path.join(self.install_doc,'html'))
outfiles = self.copy_tree(os.path.join(self.build_dir,'html'),
os.path.join(self.install_doc,'html'))
self.mkpath(os.path.join(self.install_doc,'man','man1'))
outfiles = self.copy_tree(os.path.join(self.build_dir,'man'),
os.path.join(self.install_doc,'man','man1'))
for epub in glob.glob(os.path.join(self.build_dir,'epub/*.epub')):
self.copy_file(os.path.join(epub),
os.path.join(self.install_doc,os.path.split(epub)[1]))
@@ -8,7 +8,7 @@ import os
from obidistutils.command.build_exe import build_exe
from obidistutils.serenity.checksystem import is_mac_system
from distutils import log
class pidname(build_exe):
@@ -44,7 +44,9 @@ class pidname(build_exe):
def run(self):
if is_mac_system():
log.info("Building pidname...")
build_exe.run(self)
log.info("Done")
self.pidname=True
else:
self.pidname=False
@@ -0,0 +1,46 @@
'''
Created on 10 mars 2015
@author: coissac
'''
import os.path
try:
from setuptools.command.sdist import sdist as orig_sdist
except ImportError:
from distutils.command.sdist import sdist as orig_sdist
from distutils import dir_util
class sdist(orig_sdist):
def make_distribution(self):
"""Create the source distribution(s). First, we create the release
tree with 'make_release_tree()'; then, we create all required
archive files (according to 'self.formats') from the release tree.
Finally, we clean up by blowing away the release tree (unless
'self.keep_temp' is true). The list of archive files created is
stored so it can be retrieved later by 'get_archive_files()'.
"""
# Don't warn about missing meta-data here -- should be (and is!)
# done elsewhere.
base_dir = self.distribution.get_fullname()
base_name = os.path.join(self.dist_dir,base_dir)
self.make_release_tree(os.path.join('tmp',base_dir), self.filelist.files)
archive_files = [] # remember names of files we create
# tar archive must be created last to avoid overwrite and remove
if 'tar' in self.formats:
self.formats.append(self.formats.pop(self.formats.index('tar')))
for fmt in self.formats:
file = self.make_archive(base_name, fmt, root_dir='tmp',base_dir=base_dir,
owner=self.owner, group=self.group)
archive_files.append(file)
self.distribution.dist_files.append(('sdist', '', file))
self.archive_files = archive_files
if not self.keep_temp:
dir_util.remove_tree(os.path.join('tmp',base_dir), dry_run=self.dry_run)
+16 -2
View File
@@ -8,10 +8,12 @@ from os import path
import os.path
import glob
import sys
from obidistutils.command.sdist import sdist
try:
from setuptools import setup as ori_setup
from setuptools.command.egg_info import egg_info
has_setuptools = True
except ImportError:
from distutils.core import setup as ori_setup
@@ -19,15 +21,16 @@ except ImportError:
from distutils.extension import Extension
from obidistutils.command.build import build
from obidistutils.command.littlebigman import littlebigman
from obidistutils.command.build_cexe import build_cexe
from obidistutils.command.build_sphinx import build_sphinx
from obidistutils.command import build_ext
from obidistutils.command.build_ctools import build_ctools
from obidistutils.command.build_files import build_files
from obidistutils.command.build_scripts import build_scripts
from obidistutils.command.install_scripts import install_scripts
from obidistutils.command.install_sphinx import install_sphinx
from obidistutils.command.install import install
from obidistutils.command.pidname import pidname
@@ -122,8 +125,15 @@ COMMANDS = {'build':build,
'build_cexe':build_cexe,
'build_ext': build_ext,
'build_scripts':build_scripts,
'build_sphinx':build_sphinx,
'install_scripts':install_scripts,
'install':install}
'install_sphinx':install_sphinx,
'install':install,
'sdist':sdist}
if has_setuptools:
COMMANDS['egg_info']=egg_info
CTOOLS =[]
CEXES =[]
@@ -145,6 +155,7 @@ def setup(**attrs):
except IOError:
pass
if 'distclass' not in attrs:
attrs['distclass']=Distribution
@@ -178,6 +189,9 @@ def setup(**attrs):
if 'sse' not in attrs:
attrs['sse']=None
if 'serenity' not in attrs:
attrs['serenity']=False
EXTENTION=findCython(SRC)
CEXTENTION=findC(SRC)
+6 -2
View File
@@ -4,8 +4,10 @@ Created on 20 oct. 2012
@author: coissac
'''
from distutils.dist import Distribution as ori_Distribution
try:
from setuptools.dist import Distribution as ori_Distribution
except ImportError:
from distutils.dist import Distribution as ori_Distribution
class Distribution(ori_Distribution):
@@ -17,6 +19,7 @@ class Distribution(ori_Distribution):
self.deprecated_scripts = None
self.zip_safe=False
self.sse = None
self.serenity=attrs['serenity']
ori_Distribution.__init__(self, attrs)
@@ -29,6 +32,7 @@ class Distribution(ori_Distribution):
"By default the name is PACKAGE-VERSION"
))
def has_executables(self):
return self.executables is not None and self.executables
@@ -42,7 +42,7 @@ from obidistutils.serenity.util import save_argv
from obidistutils.serenity.snake import snake
from obidistutils.serenity.globals import PIP_MINVERSION
from obidistutils.serenity.globals import PIP_MINVERSION, local_serenity
def serenity_snake(envname,package,version,minversion=PIP_MINVERSION):
@@ -63,7 +63,9 @@ def serenity_snake(envname,package,version,minversion=PIP_MINVERSION):
log.info("%s will be installed with python : %s" % (package,virtualpython))
install_requirements()
if install_requirements():
log.info("Restarting installation with all dependencies ok")
rerun_with_anothe_python(virtualpython)
log.set_threshold(old)
@@ -71,6 +73,9 @@ def serenity_assert(version,minversion=PIP_MINVERSION):
check_requirements()
def is_serenity():
from obidistutils.serenity.globals import local_serenity
return local_serenity and local_serenity[0]
def serenity_mode(package,version):
@@ -100,12 +105,13 @@ def serenity_mode(package,version):
sys.argv = [sys.argv[0]] + unknown
if args.serenity:
local_serenity.append(True)
serenity_snake(args.virtual,package,version)
else:
pass
# serenity_assert(package,version)
local_serenity.append(False)
log.set_threshold(old)
return args.serenity
@@ -80,7 +80,7 @@ def install_requirements(skip_virtualenv=True,pip=None):
if pip is None:
pip = get_a_pip_module()
install_something=False
try:
requirements = open('requirements.txt').readlines()
requirements = [x.strip() for x in requirements]
@@ -93,10 +93,13 @@ def install_requirements(skip_virtualenv=True,pip=None):
if not ok:
log.info(" Installing requirement : %s" % x)
pip_install_package(x,pip=pip)
install_something=True
except IOError:
pass
return install_something
def check_requirements(skip_virtualenv=True,pip=None):
@@ -56,41 +56,13 @@ def get_a_pip_module(minversion=PIP_MINVERSION):
tmpdir = get_serenity_dir()
if not local_pip:
# if not is_pip_installed(minversion):
# try:
# if 'http_proxy' in os.environ and 'https_proxy' not in os.environ:
# os.environ['https_proxy']=os.environ['http_proxy']
# pipinstallscript = urllib2.urlopen('https://bootstrap.pypa.io/get-pip.py')
# except:
# raise DistutilsError,"Pip (>=%s) is not install on your system and I cannot install it" % PIP_MINVERSION
#
# script = pipinstallscript.read()
# getpip_py = os.path.join(tmpdir, "get-pip.py")
# with open(getpip_py, "wb") as fp:
# log.info("Downloading temporary pip...")
# fp.write(script)
# log.info(" done.")
#
# getpip = imp.load_source("getpip",getpip_py)
# ZIPFILE=getpip.ZIPFILE
#
# pip_zip = os.path.join(tmpdir, "pip.zip")
# with open(pip_zip, "wb") as fp:
# log.info("Installing temporary pip...")
# fp.write(base64.decodestring(ZIPFILE))
# log.info(" done.")
#
# # Add the zipfile to sys.path so that we can import it
# sys.path.insert(0,pip_zip)
# zi = zipimport.zipimporter(pip_zip)
# pip = zi.load_module("pip")
# pip = importlib.import_module('obidistutils.serenity.pip')
# else:
serenity = importlib.import_module('obidistutils.serenity')
sys.path.insert(0, os.path.dirname(serenity.__file__))
pip = importlib.import_module('pip')
local_pip.append(pip)
else:
pip = local_pip[-1]
# Prepare the CERT certificat for https download
@@ -5,10 +5,12 @@ Created on 2 oct. 2014
'''
from distutils import util
from distutils import log
def is_mac_system():
platform = util.get_platform().split('-')[0]
if platform=='macosx':
log.info('You are running on a Mac platform')
return platform=='macosx'
def is_windows_system():
@@ -0,0 +1,72 @@
'''
Created on 2 oct. 2014
@author: coissac
'''
import imp
import importlib
from distutils.errors import DistutilsError
from distutils.version import StrictVersion
from distutils import log
from obidistutils.serenity.globals import local_cython # @UnusedImport
from obidistutils.serenity.checkpip import get_a_pip_module
from obidistutils.serenity.checkpackage import get_package_requirement
from obidistutils.serenity.checkpackage import parse_package_requirement
from obidistutils.serenity.checkpackage import is_installed
from obidistutils.serenity.checkpackage import pip_install_package
from obidistutils.serenity.util import get_serenity_dir
def get_a_cython_module(pip=None):
global local_cython
if not local_cython:
if pip is None:
pip = get_a_pip_module()
cython_req = get_package_requirement('Cython',pip)
if cython_req is None:
cython_req='Cython'
requirement_project,requirement_relation,minversion = parse_package_requirement(cython_req) # @UnusedVariable
if cython_req is None or not is_installed(cython_req, pip):
tmpdir = get_serenity_dir()
ok = pip_install_package(cython_req,directory=tmpdir,pip=pip)
log.debug('temp install dir : %s' % tmpdir)
if ok!=0:
raise DistutilsError, "I cannot install a cython package"
f, filename, description = imp.find_module('Cython', [tmpdir])
cythonmodule = imp.load_module('Cython', f, filename, description)
if minversion is not None:
assert StrictVersion(cythonmodule.__version__) >= minversion, \
"Unable to find suitable version of cython get %s instead of %s" % (cythonmodule.__version__,
minversion)
else:
cythonmodule = importlib.import_module('Cython')
local_cython.append(cythonmodule)
return local_cython[0]
@@ -11,3 +11,5 @@ saved_args=[]
tmpdir=[]
local_pip=[]
local_virtualenv=[]
local_cython=[]
local_serenity=[]
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More