Changeset 4710


Ignore:
Timestamp:
Jan 4, 2021 12:50:48 PM (9 months ago)
Author:
toby
Message:

set package versions from conda versions

Location:
install
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • install/g2complete/meta.yaml.template

    r4707 r4710  
    1111requirements:
    1212  run:
    13     - python>=3.8
     13    - python=**pyversion**
     14    - numpy=**npversion**
     15    - matplotlib=**mplversion**
     16    - wxpython=**wxversion**
    1417    - conda
    15     - numpy=1.19     # note hard coded in bld.bat and build.sh
    1618    - scipy
    17     - matplotlib>=3.3
    1819    - pillow
    1920    - pyopengl
    20     - wxpython<4.1
    2121    - svn
    2222    - hdf5
  • install/g2full/construct.yaml.template

    r4708 r4710  
    44
    55channels:
    6   - https://repo.continuum.io/pkgs/main//linux-64
    7   - https://repo.continuum.io/pkgs/main/noarch
    8   - https://conda.anaconda.org/conda-forge/linux-64
    9   - https://conda.anaconda.org/conda-forge/noarch
     6  - https://repo.continuum.io/pkgs/main
     7  - https://conda.anaconda.org/conda-forge
    108 
    119specs:
    12     - python>=3.8
    13     - conda
    14     - numpy=1.19
    15     - scipy
    16     - matplotlib>=3.3
     10    - python=**pyversion**
     11    - numpy=**npversion**
     12    - matplotlib=**mplversion**
     13    - wxpython=**wxversion**
    1714    - pillow
    1815    - pyopengl
    19     - wxpython<4.1
     16    - scipy
     17    - conda
    2018    - svn
    2119    - hdf5
  • install/setversion.py

    r4705 r4710  
    3434    if line.startswith('Rev'):
    3535        version = line.split()[1].strip()
     36        print ('Version is {}'.format(out))
    3637        break
    3738else:
    3839    print ('Version not found!\nout=%s'%out)
    3940    sys.exit(1)
    40 for fil in 'g2complete/meta.yaml','g2full/construct.yaml':
    41     fp = open(fil+'.template','r')
    42     out = fp.read().replace('**Version**',version)
     41
     42import numpy as np
     43import wx
     44import matplotlib as mpl
     45import platform
     46npversion = np.__version__[:np.__version__.find('.',2)]
     47#wxversion = wx.__version__[:wx.__version__.find('.',2)]
     48wxversion = wx.__version__
     49mplversion = mpl.__version__[:mpl.__version__.find('.',2)]
     50pyversion = platform.python_version()
     51if pyversion.find('.',2) > 0: pyversion = pyversion[:pyversion.find('.',2)]
     52print ('SVN version is    {}'.format(version))
     53print ('python version is {}'.format(pyversion))
     54print ('numpy version is  {}'.format(npversion))
     55print ('wx version is     {}'.format(wxversion))
     56print ('MPL version is    {}'.format(mplversion))
     57
     58for fil in ('g2complete/meta.yaml','g2complete/build.sh',
     59                'g2complete/bld.bat',
     60                'g2full/construct.yaml',
     61                ):
     62    try:
     63        fp = open(fil+'.template','r')
     64        out = fp.read().replace('**Version**',version)
     65        fp.close()
     66    except FileNotFoundError:
     67        print('Skipping ',fil)
     68        continue
    4369    if sys.platform == "win32" and platform.architecture()[0] != '64bit':
    4470        print('changing for 32-bit windows')
    4571        out = out.replace('win-64','win-32')
    46     if sys.platform == "win32" and platform.architecture()[0] != '32bit':
     72    if sys.platform.startswith("linux") and platform.architecture()[0] != '32bit':
    4773        print('changing for 32-bit linux')
    4874        out = out.replace('linux-64','linux-32')
    49     fp.close()
     75    out = out.replace('**pyversion**',pyversion)
     76    out = out.replace('**npversion**',npversion)
     77    out = out.replace('**wxversion**',wxversion)
     78    out = out.replace('**mplversion**',mplversion)
    5079    print('Creating',fil)
    5180    fp = open(fil,'w')
Note: See TracChangeset for help on using the changeset viewer.