mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Merge branch 'master' of https://github.com/coolprop/coolprop
This commit is contained in:
@@ -84,8 +84,8 @@ steps on a Windows machine::
|
||||
|
||||
conda create -n CoolProp27 python=2
|
||||
conda create -n CoolProp34 python=3
|
||||
conda install -n CoolProp27 cython pip pywin32
|
||||
conda install -n CoolProp34 cython pip pywin32
|
||||
conda install -n CoolProp27 cython pip pywin32 unxutils jinja2 pyyaml
|
||||
conda install -n CoolProp34 cython pip pywin32 unxutils jinja2 pyyaml
|
||||
|
||||
activate CoolProp27
|
||||
pip install wheel
|
||||
@@ -100,8 +100,8 @@ On a Linux system, things only change a little bit::
|
||||
|
||||
conda create -n CoolProp27 python=2
|
||||
conda create -n CoolProp34 python=3
|
||||
conda install -n CoolProp27 cython pip
|
||||
conda install -n CoolProp34 cython pip
|
||||
conda install -n CoolProp27 cython pip jinja2 pyyaml
|
||||
conda install -n CoolProp34 cython pip jinja2 pyyaml
|
||||
|
||||
source activate CoolProp27
|
||||
pip install wheel
|
||||
|
||||
@@ -21,7 +21,7 @@ library.
|
||||
* **script**: Wait for all bots to finish and run the release script by launching the ``release version`` bot with dry run disabled and the correct version number. This uploads binaries to pypi and sourceforge. Ignore the warning ``failed to set times on "/home/project-web/coolprop/htdocs/jscript/coolprop-latest.js"``, it is a symlink and will be overwritten...
|
||||
* **clean up**: If everything went well, you can proceed:
|
||||
|
||||
- Tag the release branch in your git software. It is a good idea to make and annotated tag and include the information on the closed issues here as well.
|
||||
- Tag the release branch in your git software. It is a good idea to make an annotated tag and include the information on the closed issues here as well.
|
||||
- Change the default download file on sourceforge to point to the new zipped sources.
|
||||
- Bump the version number in the CMake file and commit.
|
||||
- Announce the new features if you like...
|
||||
|
||||
@@ -368,6 +368,7 @@ def pythonFactory(pyID, pyCFG=PythonSlaveConfig("name"), gitMode='incremental'):
|
||||
raise ValueError("Your selected Python environment \"{0}\" does not have installer options in this builder factory".format(pyID))
|
||||
#
|
||||
activateCMD = " ".join([pyact, pyenv]) # We always activate an environment, regardless of the host
|
||||
#
|
||||
installCMD = " ".join(["python", "setup.py"] + pyins)
|
||||
combinedCMD = " && ".join([activateCMD, installCMD])
|
||||
factory.addStep(ShellCommand(command = combinedCMD, workdir = workingFolder, haltOnFailure = True))
|
||||
@@ -377,6 +378,23 @@ def pythonFactory(pyID, pyCFG=PythonSlaveConfig("name"), gitMode='incremental'):
|
||||
if not checkID(pyID, teID=300, strict=False): # Only upload non-Linux files
|
||||
factory.addStep(DirectoryUpload(slavesrc=uploadFolder, masterdest=masterdestLocation, url="binaries", compress="bz2"))
|
||||
fixPermissions(factory)
|
||||
#
|
||||
pkgs = ["requests", "jinja2", "pyyaml", "numpy", "scipy", "matplotlib", "pandas", "cython"]
|
||||
if checkID(pyID, teID=100, strict=False): pkgs.extend(["unxutils","pywin32"]) # Add Windows-only dependency
|
||||
installCMD = " ".join(["conda", "install", "-yq"]) + " " + " ".join(pkgs)
|
||||
combinedCMD = " && ".join([activateCMD, installCMD])
|
||||
factory.addStep(ShellCommand(command = combinedCMD, workdir = workingFolder, haltOnFailure = False))
|
||||
#
|
||||
installCMD = " ".join(["python", "conda_builder.py"])
|
||||
combinedCMD = " && ".join([activateCMD, installCMD])
|
||||
factory.addStep(ShellCommand(command = combinedCMD, workdir = workingFolder+"/conda", haltOnFailure = False))
|
||||
#
|
||||
installCMD = " ".join(["conda", "build", "coolprop"])
|
||||
combinedCMD = " && ".join([activateCMD, installCMD])
|
||||
factory.addStep(ShellCommand(command = combinedCMD, workdir = workingFolder+"/conda", haltOnFailure = False))
|
||||
#
|
||||
#installCMD = " ".join(["binstar", "upload", "--channel", "dev"])
|
||||
#
|
||||
return factory
|
||||
|
||||
|
||||
@@ -1067,7 +1085,7 @@ for platform in ['OSX', 'linux', 'windows']:
|
||||
slavenames=[platform + platmod +"-slave"],
|
||||
factory = cmake_slave(wrapper,
|
||||
platform = platform,
|
||||
cmake_env = cmake_env
|
||||
cmake_env = cmake_env,
|
||||
ctest_args = ctest_args,
|
||||
cmake_args = cmake_args,
|
||||
build_args = build_args)
|
||||
|
||||
84
wrappers/Python/conda/conda_builder.py
Normal file
84
wrappers/Python/conda/conda_builder.py
Normal file
@@ -0,0 +1,84 @@
|
||||
import jinja2
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
from distutils.version import LooseVersion #, StrictVersion
|
||||
import codecs
|
||||
|
||||
""" A simple script to create a conda recipe from the PyPI release and build the package"""
|
||||
|
||||
template_dir = os.path.dirname(__file__)
|
||||
target_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),'coolprop'))
|
||||
|
||||
pkgs = ["numpy", "scipy", "matplotlib", "pandas", "cython"]
|
||||
|
||||
loader = jinja2.FileSystemLoader(template_dir)
|
||||
environment = jinja2.Environment(loader=loader)
|
||||
|
||||
target = 'meta.yaml'
|
||||
template = environment.get_template(os.path.join(template_dir,'conda_'+target+'.tpl'))
|
||||
|
||||
# Get the additional information from PyPI
|
||||
r = requests.get('https://pypi.python.org/pypi/CoolProp/json')
|
||||
if(r.ok):
|
||||
item = json.loads(r.text or r.content)
|
||||
version = item['info']['version']
|
||||
#version = sorted(item['releases'].keys())[-1]
|
||||
home = item['info']['home_page']
|
||||
license = 'MIT'
|
||||
summary = item['info']['summary']
|
||||
|
||||
for u in item['urls']:
|
||||
if u['python_version'] != 'source': continue
|
||||
fil = u['filename']
|
||||
url = u['url']
|
||||
md5 = u['md5_digest']
|
||||
continue
|
||||
|
||||
f = codecs.open(os.path.join(target_dir,target),mode='wb',encoding='utf-8')
|
||||
f.write(template.render(
|
||||
version=version,
|
||||
fil=fil,
|
||||
url=url,
|
||||
md5=md5,
|
||||
pkgs=pkgs,
|
||||
home = home,
|
||||
license = license,
|
||||
summary = summary
|
||||
))
|
||||
f.close()
|
||||
|
||||
|
||||
# release = item['releases'][version]
|
||||
|
||||
# for d in release:
|
||||
# if d['python_version'] == 'source':
|
||||
# fil =
|
||||
# url =
|
||||
# md5 = d['md5_digest']
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##tag = sorted(tags.keys())[-1]
|
||||
|
||||
##for tag in sorted(tags.keys()):
|
||||
## print tag
|
||||
## r = requests.get('https://api.github.com/repos/coolprop/coolprop/git/tags/'+tags[tag])
|
||||
## if(r.ok):
|
||||
## items = json.loads(r.text or r.content)
|
||||
## print str(items)
|
||||
|
||||
##def cmp(x,y): return LooseVersion(x).__cmp__(y)
|
||||
##tag = sorted(tags.keys(),cmp=cmp)[-1]
|
||||
#tag = sorted(tags.keys())[-1]
|
||||
##from pkg_resources import parse_version
|
||||
##>>> parse_version('1.4') > parse_version('1.4-rc2')
|
||||
#if tag[0]=='v': version = tag[1:]
|
||||
#else: version = tag
|
||||
|
||||
#f = codecs.open(os.path.join(target_dir,target),mode='wb',encoding='utf-8')
|
||||
##f = open(name,mode='w')
|
||||
#f.write(template.render(version=version,tag=tag,pkgs=pkgs))
|
||||
#f.close()
|
||||
53
wrappers/Python/conda/conda_meta.yaml.tpl
Normal file
53
wrappers/Python/conda/conda_meta.yaml.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
package:
|
||||
name: coolprop
|
||||
version: {{ version }}
|
||||
|
||||
source:
|
||||
fn: {{ fil }}
|
||||
url: {{ url }}
|
||||
md5: {{ md5 }}
|
||||
|
||||
# If this is a new build for the same version, increment the build
|
||||
# number. If you do not include this key, it defaults to 0.
|
||||
# number: 1
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- python
|
||||
- setuptools{% for pkg in pkgs %}
|
||||
- {{ pkg -}}
|
||||
{% endfor %}
|
||||
|
||||
run:
|
||||
- python{% for pkg in pkgs %}
|
||||
- {{ pkg -}}
|
||||
{% endfor %}
|
||||
|
||||
test:
|
||||
# Python imports
|
||||
imports:
|
||||
- CoolProp
|
||||
#- CoolProp.GUI
|
||||
#- CoolProp.Plots
|
||||
- CoolProp.tests
|
||||
|
||||
# commands:
|
||||
# You can put test commands to be run here. Use this to test that the
|
||||
# entry points work.
|
||||
|
||||
|
||||
# You can also put a file called run_test.py in the recipe that will be run
|
||||
# at test time.
|
||||
|
||||
# requires:
|
||||
# Put any additional test requirements here. For example
|
||||
# - nose
|
||||
|
||||
about:
|
||||
home: {{ home }}
|
||||
license: {{ license }}
|
||||
summary: {{ sumamry }}
|
||||
|
||||
# See
|
||||
# http://docs.continuum.io/conda/build.html for
|
||||
# more information about meta.yaml
|
||||
1
wrappers/Python/conda/coolprop/.gitignore
vendored
Normal file
1
wrappers/Python/conda/coolprop/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/meta.yaml
|
||||
8
wrappers/Python/conda/coolprop/bld.bat
Normal file
8
wrappers/Python/conda/coolprop/bld.bat
Normal file
@@ -0,0 +1,8 @@
|
||||
"%PYTHON%" setup.py install
|
||||
if errorlevel 1 exit 1
|
||||
|
||||
:: Add more build steps here, if they are necessary.
|
||||
|
||||
:: See
|
||||
:: http://docs.continuum.io/conda/build.html
|
||||
:: for a list of environment variables that are set during the build process.
|
||||
9
wrappers/Python/conda/coolprop/build.sh
Normal file
9
wrappers/Python/conda/coolprop/build.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
$PYTHON setup.py install
|
||||
|
||||
# Add more build steps here, if they are necessary.
|
||||
|
||||
# See
|
||||
# http://docs.continuum.io/conda/build.html
|
||||
# for a list of environment variables that are set during the build process.
|
||||
Reference in New Issue
Block a user