Skip to content

Review status of NumPy in PyPy #953

Closed

Description

@peterjc

Last time we looked at this, PyPy's reimplementation of NumPy was very incomplete - missing things like linear algebra support - but they have been making steady improvement, see http://buildbot.pypy.org/numpy-status/latest.html and https://morepypy.blogspot.co.uk/search/label/numpy

Note according to https://bitbucket.org/pypy/numpy they do not yet support NumPy under PyPy for Python 3.

Part of this would be installing PyPy's NumPy port under TravisCI.

Note it looks like there it now no need to modify the imports,

$ pypy
Python 2.7.10 (c95650101a99, Sep 06 2016, 10:37:47)
[PyPy 5.4.1 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
>>>> numpy.__version__
'1.10.0'
>>>> quit()

This is still not going to work with our C code using NumPy, so things like Bio.Cluster would not be expected to work.

Activity

  1. peterjc commented on Oct 7, 2016

    @peterjc
    MemberAuthor

    Things are looking pretty good, test_PDB.py passes for example:

    $ pypy setup.py test
    running test
    Python version: 2.7.10 (c95650101a99, Sep 06 2016, 10:37:47)
    [PyPy 5.4.1 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
    Operating system: posix darwin
    test_Ace ... ok
    test_AlignIO ... ok
    test_AlignIO_ClustalIO ... ok
    test_AlignIO_EmbossIO ... ok
    test_AlignIO_FastaIO ... ok
    test_AlignIO_PhylipIO ... ok
    test_AlignIO_convert ... ok
    test_AlignInfo ... ok
    test_Application ... ok
    test_BWA_tool ... ok
    test_BioSQL_MySQLdb ... skipping. BioSQL test configuration file biosql.ini missing (see biosql.ini.sample)
    test_BioSQL_MySQLdb_online ... skipping. BioSQL test configuration file biosql.ini missing (see biosql.ini.sample)
    test_BioSQL_mysql_connector ... skipping. BioSQL test configuration file biosql.ini missing (see biosql.ini.sample)
    test_BioSQL_mysql_connector_online ... skipping. BioSQL test configuration file biosql.ini missing (see biosql.ini.sample)
    test_BioSQL_psycopg2 ... skipping. BioSQL test configuration file biosql.ini missing (see biosql.ini.sample)
    test_BioSQL_psycopg2_online ... skipping. BioSQL test configuration file biosql.ini missing (see biosql.ini.sample)
    test_BioSQL_sqlite3 ... ok
    test_BioSQL_sqlite3_online ... ok
    test_CAPS ... ok
    test_CelFile ... ok
    test_Chi2 ... ok
    test_ClustalOmega_tool ... ok
    test_Clustalw_tool ... ok
    test_Cluster ... skipping. If you want to use Bio.Cluster, install NumPy first and then reinstall Biopython
    test_CodonTable ... ok
    test_CodonUsage ... ok
    test_ColorSpiral ... skipping. Install reportlab if you want to use Bio.Graphics.
    test_Compass ... ok
    test_Consensus ... ok
    test_Crystal ... ok
    test_DSSP_tool ... skipping. Install dssp if you want to use it from Biopython.
    test_Dialign_tool ... ok
    test_DocSQL ... skipping. Install MySQLdb if you want to use Bio.DocSQL.
    test_EMBL_unittest ... ok
    test_Emboss ... ok
    test_EmbossPhylipNew ... skipping. Install the Emboss package 'PhylipNew' if you want to use the Bio.Emboss.Applications wrappers for phylogenetic tools.
    test_EmbossPrimer ... ok
    test_Entrez ... ok
    test_Entrez_online ... ok
    test_Entrez_parser ... ok
    test_Enzyme ... ok
    test_FSSP ... ok
    test_Fasttree_tool ... ok
    test_File ... ok
    test_GACrossover ... ok
    test_GAMutation ... ok
    test_GAOrganism ... ok
    test_GAQueens ... ok
    test_GARepair ... ok
    test_GASelection ... ok
    test_GenBank ... ok
    test_GenBank_unittest ... ok
    test_GenomeDiagram ... skipping. Install reportlab if you want to use Bio.Graphics.
    test_GraphicsBitmaps ... skipping. Install ReportLab if you want to use Bio.Graphics.
    test_GraphicsChromosome ... skipping. Install reportlab if you want to use Bio.Graphics.
    test_GraphicsDistribution ... skipping. Install reportlab if you want to use Bio.Graphics.
    test_GraphicsGeneral ... skipping. Install reportlab if you want to use Bio.Graphics.
    test_HMMCasino ... ok
    test_HMMGeneral ... ok
    test_KDTree ... skipping. C module in Bio.KDTree not compiled
    test_KEGG ... ok
    test_KEGG_online ... ok
    test_KGML_graphics ... skipping. Please install ReportLab if you want to use Bio.Graphics. You can find ReportLab at http://www.reportlab.com/software/opensource/
    test_KGML_graphics_online ... skipping. Please install ReportLab if you want to use Bio.Graphics. You can find ReportLab at http://www.reportlab.com/software/opensource/
    test_KGML_nographics ... ok
    test_KeyWList ... ok
    test_Location ... ok
    test_LogisticRegression ... ok
    test_MMCIF ... ok
    test_MSAProbs_tool ... skipping. Install msaprobs if you want to use MSAProbs from Biopython.
    test_Mafft_tool ... ok
    test_MarkovModel ... ok
    test_Medline ... ok
    test_Muscle_tool ... ok
    test_NACCESS_tool ... skipping. Install naccess if you want to use it from Biopython.
    test_NCBITextParser ... ok
    test_NCBIXML ... ok
    test_NCBI_BLAST_tools ... ok
    test_NCBI_qblast ... ok
    test_NNExclusiveOr ... ok
    test_NNGene ... ok
    test_NNGeneral ... ok
    test_NaiveBayes ... ok
    test_Nexus ... ok
    test_PAML_baseml ... ok
    test_PAML_codeml ... ok
    test_PAML_tools ... ok
    test_PAML_yn00 ... ok
    test_PDB ... ok
    test_PDB_KDTree ... skipping. C module in Bio.KDTree not compiled
    test_ParserSupport ... ok
    test_Pathway ... ok
    test_Phd ... ok
    test_Phylo ... ok
    test_PhyloXML ... ok
    test_Phylo_CDAO ... skipping. Install RDFlib if you want to use the CDAO tree format.
    test_Phylo_NeXML ... ok
    test_Phylo_matplotlib ... skipping. Install matplotlib if you want to use Bio.Phylo._utils.
    test_Phylo_networkx ... skipping. Install networkx if you wish to use it with Bio.Phylo
    test_PopGen_DFDist ... ok
    test_PopGen_FDist ... skipping. Install fdist2, datacal, pv and cplot if you want to use FDist2 with Bio.PopGen.FDist.
    test_PopGen_FDist_nodepend ... ok
    test_PopGen_FastSimCoal ... skipping. Install fastsimcoal if you want to use Bio.PopGen.SimCoal.Controller.FastSimCoalController.
    test_PopGen_GenePop ... ok
    test_PopGen_GenePop_EasyController ... ok
    test_PopGen_GenePop_nodepend ... ok
    test_PopGen_SimCoal ... skipping. Install SIMCOAL2 if you want to use Bio.PopGen.SimCoal.
    test_PopGen_SimCoal_nodepend ... ok
    test_Prank_tool ... ok
    test_Probcons_tool ... ok
    test_ProtParam ... ok
    test_QCPSuperimposer ... ERROR
    test_RCSBFormats ... ok
    test_Restriction ... ok
    test_SCOP_Astral ... ok
    test_SCOP_Cla ... ok
    test_SCOP_Des ... ok
    test_SCOP_Dom ... ok
    test_SCOP_Hie ... ok
    test_SCOP_Raf ... ok
    test_SCOP_Residues ... ok
    test_SCOP_Scop ... ok
    test_SCOP_online ... ok
    test_SVDSuperimposer ... ok
    test_SearchIO_blast_tab ... ok
    test_SearchIO_blast_tab_index ... ok
    test_SearchIO_blast_text ... ok
    test_SearchIO_blast_xml ... ok
    test_SearchIO_blast_xml_index ... ok
    test_SearchIO_blat_psl ... ok
    test_SearchIO_blat_psl_index ... ok
    test_SearchIO_exonerate ... ok
    test_SearchIO_exonerate_text_index ... ok
    test_SearchIO_exonerate_vulgar_index ... ok
    test_SearchIO_fasta_m10 ... ok
    test_SearchIO_fasta_m10_index ... ok
    test_SearchIO_hmmer2_text ... ok
    test_SearchIO_hmmer2_text_index ... ok
    test_SearchIO_hmmer3_domtab ... ok
    test_SearchIO_hmmer3_domtab_index ... ok
    test_SearchIO_hmmer3_tab ... ok
    test_SearchIO_hmmer3_tab_index ... ok
    test_SearchIO_hmmer3_text ... ok
    test_SearchIO_hmmer3_text_index ... ok
    test_SearchIO_model ... ok
    test_SearchIO_write ... ok
    test_SeqFeature ... ok
    test_SeqIO ... ok
    test_SeqIO_AbiIO ... ok
    test_SeqIO_FastaIO ... ok
    test_SeqIO_Insdc ... ok
    test_SeqIO_PdbIO ... /Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/SeqIO/PdbIO.py:187: BiopythonWarning: First line is not a 'HEADER'; can't determine PDB ID. Line: 'TITLE     STRUCTURE OF THE COMPLEX OF LAC REPRESSOR HEADPIECE AND AN\n'
      "Line: %r" % firstline, BiopythonWarning)
    /Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/SeqIO/PdbIO.py:187: BiopythonWarning: First line is not a 'HEADER'; can't determine PDB ID. Line: 'REMARK INTRODUCED BUGS IN RESIDUES 2,3,4 AND WAT 67\n'
      "Line: %r" % firstline, BiopythonWarning)
    ok
    test_SeqIO_QualityIO ... ok
    test_SeqIO_SeqXML ... ok
    test_SeqIO_convert ... ok
    test_SeqIO_features ... ok
    test_SeqIO_index ... ok
    test_SeqIO_online ... ok
    test_SeqIO_write ... ok
    test_SeqRecord ... ok
    test_SeqUtils ... ok
    test_Seq_objs ... ok
    test_SffIO ... ok
    test_SubsMat ... ok
    test_SwissProt ... ok
    test_TCoffee_tool ... ok
    test_TogoWS ... FAIL
    test_TreeConstruction ... ok
    test_Tutorial ... /Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/pairwise2.py:993: BiopythonWarning: Import of C module failed. Falling back to pure Python implementation. This may be slooow...
      'implementation. This may be slooow...', BiopythonWarning)
    FAIL
    test_UniGene ... ok
    test_Uniprot ... ok
    test_Wise ... skipping. Install Wise2 (dnal) if you want to use Bio.Wise.
    test_XXmotif_tool ... skipping. Install XXmotif if you want to use XXmotif from Biopython.
    test_align ... ok
    test_bgzf ... ok
    test_codonalign ... ok
    test_geo ... ok
    test_kNN ... ok
    test_lowess ... ok
    test_mmtf ... skipping. Install mmtf to use Bio.PDB.mmtf (e.g. pip install mmtf-python)
    test_motifs ... ok
    test_motifs_online ... ok
    test_pairwise2 ... ok
    test_phenotype ... FAIL
    test_phenotype_fit ... skipping. Install SciPy if you want to use Bio.phenotype fit functionality.
    test_phyml_tool ... ok
    test_prodoc ... ok
    test_prosite1 ... ok
    test_prosite2 ... ok
    test_psw ... skipping. Install Wise2 (dnal) if you want to use Bio.Wise.
    test_raxml_tool ... ok
    test_samtools_tool ... ok
    test_seq ... ok
    test_translate ... ok
    test_trie ... skipping. Could not import Bio.trie, check C code was compiled.
    Bio.Align docstring test ... ok
    Bio.Align.Applications._Clustalw docstring test ... ok
    Bio.Align.Applications._ClustalOmega docstring test ... ok
    Bio.Align.Applications._Dialign docstring test ... ok
    Bio.Align.Applications._MSAProbs docstring test ... ok
    Bio.Align.Applications._Mafft docstring test ... ok
    Bio.Align.Applications._Muscle docstring test ... ok
    Bio.Align.Applications._Probcons docstring test ... ok
    Bio.Align.Applications._Prank docstring test ... ok
    Bio.Align.Applications._TCoffee docstring test ... ok
    Bio.AlignIO docstring test ... ok
    Bio.AlignIO.StockholmIO docstring test ... ok
    Bio.Alphabet docstring test ... ok
    Bio.Application docstring test ... ok
    Bio.bgzf docstring test ... ok
    Bio.codonalign docstring test ... ok
    Bio.codonalign.codonalignment docstring test ... ok
    Bio.codonalign.codonalphabet docstring test ... ok
    Bio.codonalign.codonseq docstring test ... ok
    Bio.Blast.Applications docstring test ... ok
    Bio.Emboss.Applications docstring test ... ok
    Bio.GenBank docstring test ... ok
    Bio.KEGG.Compound docstring test ... ok
    Bio.KEGG.Enzyme docstring test ... ok
    Bio.NMR.xpktools docstring test ... ok
    Bio.motifs docstring test ... ok
    Bio.motifs.applications._xxmotif docstring test ... ok
    Bio.pairwise2 docstring test ... ok
    Bio.Phylo.Applications._Raxml docstring test ... ok
    Bio.Phylo.Consensus docstring test ... ok
    Bio.Phylo.BaseTree docstring test ... ok
    Bio.SearchIO docstring test ... ok
    Bio.SearchIO._model docstring test ... ok
    Bio.SearchIO._model.query docstring test ... ok
    Bio.SearchIO._model.hit docstring test ... ok
    Bio.SearchIO._model.hsp docstring test ... ok
    Bio.SearchIO.BlastIO docstring test ... ok
    Bio.SearchIO.HmmerIO docstring test ... ok
    Bio.SearchIO.FastaIO docstring test ... ok
    Bio.SearchIO.BlatIO docstring test ... ok
    Bio.SearchIO.ExonerateIO docstring test ... ok
    Bio.Seq docstring test ... ok
    Bio.SeqIO docstring test ... ok
    Bio.SeqIO.AceIO docstring test ... ok
    Bio.SeqIO.FastaIO docstring test ... ok
    Bio.SeqIO.IgIO docstring test ... ok
    Bio.SeqIO.InsdcIO docstring test ... ok
    Bio.SeqIO.PhdIO docstring test ... ok
    Bio.SeqIO.PirIO docstring test ... ok
    Bio.SeqIO.QualityIO docstring test ... ok
    Bio.SeqIO.SffIO docstring test ... ok
    Bio.SeqIO.TabIO docstring test ... ok
    Bio.SeqFeature docstring test ... ok
    Bio.SeqRecord docstring test ... ok
    Bio.SeqUtils docstring test ... ok
    Bio.SeqUtils.CheckSum docstring test ... ok
    Bio.SeqUtils.MeltingTemp docstring test ... ok
    Bio.Sequencing.Applications._Novoalign docstring test ... ok
    Bio.Sequencing.Applications._bwa docstring test ... ok
    Bio.Sequencing.Applications._samtools docstring test ... ok
    Bio.SwissProt docstring test ... ok
    Bio.Wise docstring test ... ok
    Bio.Wise.psw docstring test ... ok
    ======================================================================
    ERROR: test_QCPSuperimposer
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "run_tests.py", line 420, in runTest
        suite = loader.loadTestsFromName(name)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/unittest/loader.py", line 91, in loadTestsFromName
        module = __import__('.'.join(parts_copy))
      File "test_QCPSuperimposer.py", line 16, in <module>
        from Bio.PDB.QCPSuperimposer import QCPSuperimposer
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/PDB/QCPSuperimposer/__init__.py", line 15, in <module>
        from .qcprotmodule import FastCalcRMSDAndRotation
    ImportError: No module named Bio.PDB.QCPSuperimposer.qcprotmodule
    ======================================================================
    ERROR: test_pdb_search_porin (test_TogoWS.TogoSearch)
    Bio.TogoWS.search_iter("pdb", "porin") etc
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_TogoWS.py", line 441, in test_pdb_search_porin
        self.check("pdb", "porin", ["2j1n", "2vqg", "3m8b", "2k0l"])
      File "test_TogoWS.py", line 463, in check
        search_count = TogoWS.search_count(database, search_term)
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/TogoWS/__init__.py", line 167, in search_count
        handle = _open(url)
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/TogoWS/__init__.py", line 335, in _open
        handle = _urlopen(url)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/urllib2.py", line 154, in urlopen
        return opener.open(url, data, timeout)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/urllib2.py", line 437, in open
        response = meth(req, response)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/urllib2.py", line 550, in http_response
        'http', request, response, code, msg, hdrs)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/urllib2.py", line 475, in error
        return self._call_chain(*args)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/urllib2.py", line 409, in _call_chain
        result = func(*args)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/urllib2.py", line 558, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    HTTPError: HTTP Error 500: Internal Server Error
    
    ======================================================================
    ERROR: test_doctests (test_Tutorial.TutorialTestCase)
    Run tutorial doctests.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_Tutorial.py", line 225, in test_doctests
    ValueError: 1 Tutorial doctests failed: test_chapter_phenotype_line_00115
    
    ======================================================================
    ERROR: test_PlateRecord (test_phenotype.TestPhenoMicro)
    Test basic functionalities of PlateRecord objects
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_phenotype.py", line 118, in test_PlateRecord
        self.assertEqual(p[1, 2], p['B03'])
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/unittest/case.py", line 515, in assertEqual
        assertion_func(first, second, msg=msg)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/lib-python/2.7/unittest/case.py", line 505, in _baseAssertEqual
        if not first == second:
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 686, in __eq__
        if np.isnan(self[k]) and np.isnan(other[k]):
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 672, in __getitem__
        return self._interpolate(time)
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 637, in _interpolate
        left=np.nan, right=np.nan)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/site-packages/numpy/lib/function_base.py", line 1267, in interp
        return compiled_interp([x], xp, fp, left, right).item()
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/site-packages/numpy/core/multiarray.py", line 83, in tmp
        raise NotImplementedError("%s not implemented yet" % func)
    NotImplementedError: interp not implemented yet
    
    ======================================================================
    ERROR: test_WellRecord (test_phenotype.TestPhenoMicro)
    Test basic functionalities of WellRecord objects
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_phenotype.py", line 217, in test_WellRecord
        self.assertEqual(len(w[:]), 96)
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 668, in __getitem__
        time = np.arange(start, stop, time.step)
    TypeError: unsupported operand type(s) for div: 'float' and 'NoneType'
    
    ======================================================================
    ERROR: test_phenotype_IO (test_phenotype.TestPhenoMicro)
    Test basic functionalities of phenotype IO methods
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_phenotype.py", line 60, in test_phenotype_IO
        c = phenotype.write([p1, p2], handle, 'pm-json')
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/__init__.py", line 141, in write
        count = writer_class(plates).write(fp)
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 1125, in write
        out.append(_toOPM(plate))
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 1106, in _toOPM
        d[_measurements][wid].append(w[hour])
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 672, in __getitem__
        return self._interpolate(time)
      File "/Volumes/Hitachi-3TB-mirrored/repositories/biopython/Bio/phenotype/phen_micro.py", line 637, in _interpolate
        left=np.nan, right=np.nan)
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/site-packages/numpy/lib/function_base.py", line 1267, in interp
        return compiled_interp([x], xp, fp, left, right).item()
      File "/Users/pjcock/Downloads/Software/pypy2-v5.4.1-osx64/site-packages/numpy/core/multiarray.py", line 83, in tmp
        raise NotImplementedError("%s not implemented yet" % func)
    NotImplementedError: interp not implemented yet
    
    ----------------------------------------------------------------------
    Ran 258 tests in 594.099 seconds
    
    FAILED (failures = 4)
    

    Tested with current latest Biopython 6b2b125 and current latest PyPy NumPy https://bitbucket.org/pypy/numpy/commits/26e09b343fc3329dab0fbd12e8afb31af4a35808

    (The TogoWS porin search failure is unrelated)

    Two cases of NotImplementedError: interp not implemented yet which are clearly PyPy-NumPy issues.

  2. peterjc commented on Oct 7, 2016

    @peterjc
    MemberAuthor

    Installation of PyPy's NumPy ought to be possible under TravisCI, but right now the version of PyPy on TravisCI is too old:

    e.g. https://travis-ci.org/peterjc/biopython/jobs/165856002

    $ python --version
    Python 2.7.8 (10f1b29a2bd2, Feb 02 2015, 21:22:43)
    [PyPy 2.5.0 with GCC 4.6.3]
    ...
    $ pip install --upgrade pip setuptools
    $ if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install git+https://bitbucket.org/pypy/numpy.git; fi
    Collecting git+https://bitbucket.org/pypy/numpy.git
      Cloning https://bitbucket.org/pypy/numpy.git to /tmp/pip-_9VICD-build
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "app_main.py", line 75, in run_toplevel
          File "app_main.py", line 581, in run_it
          File "<string>", line 1, in <module>
          File "/tmp/pip-_9VICD-build/setup.py", line 33, in <module>
            ('.'.join(map(str, MIN_PYPY_VERSION)),))
        RuntimeError: PyPy version >= 4.1 required
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-_9VICD-build/
    The command "if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install git+https://bitbucket.org/pypy/numpy.git; fi" failed and exited with 1 during .
    Your build has been stopped.
    
  3. peterjc commented on Mar 2, 2017

    @peterjc
    MemberAuthor

    Quoting a recent PyPy project blog post in November 2016,

    "We continue to make incremental improvements to our C-APIcompatibility layer (cpyext). We pass all but 12 of the over-6000 tests in the upstream NumPy test suite, and have begun examining what it would take to support Pandas and PyQt."

    https://morepypy.blogspot.co.uk/2016/11/pypy27-v56-released-stdlib-2712-support.html

    Perhaps the Biopython C code can also take advantage of cpyext to work under PyPy (something I have not looked at)?

  4. peterjc commented on Mar 23, 2017

    @peterjc
    MemberAuthor

    Things look very good under PyPy2 v5.6 and the brand new PyPy2 v5.7 as well...

  5. peterjc commented on Mar 23, 2017

    @peterjc
    MemberAuthor

    After some small tweaks to setup.py, under macOS with PyPy2 v5.6 and v5.7, it looks everything except compiling Bio.trie is working:

    building 'Bio.trie' extension
    gcc -pthread -arch x86_64 -DNDEBUG -O2 -Qunused-arguments -Qunused-arguments -fPIC -IBio -I/Users/pc40583/Downloads/Software/pypy2-v5.7.0-osx64/include -c Bio/triemodule.c -o build/temp.macosx-10.12-x86_64-2.7/Bio/triemodule.o
    Bio/triemodule.c:2:10: fatal error: 'marshal.h' file not found
    #include <marshal.h>
             ^
    1 error generated.
    error: command 'gcc' failed with exit status 1
    
  6. peterjc commented on Mar 24, 2017

    @peterjc
    MemberAuthor

    Almost everything is working according to the test suite:

    I intend to enable our NumPy-dependent code, and most of our C code, under PyPy...

  7. peterjc commented on Apr 6, 2017

    @peterjc
    MemberAuthor

    Bio.Trie still fails to compile, but the numpy.float64 issue has been fixed in NumPy.

    Thinks look good for Biopython's NumPy code under PyPy now - closing :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions