diff --git a/.github/workflows/conda-package-build.yml b/.github/workflows/conda-package-build.yml index 23eafef..ecaf733 100644 --- a/.github/workflows/conda-package-build.yml +++ b/.github/workflows/conda-package-build.yml @@ -1,67 +1,20 @@ -name: build_publish_anaconda +name: Building Package on: push: - branches: [ master ] + branches: + - '**' + tags: + - 'v*' pull_request: - branches: [ master ] - -jobs: - build-and-publish: - name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - max-parallel: 3 - matrix: - os: [ ubuntu-latest ] - python-minor-version: [9] - isMaster: - - ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/dev') }} - exclude: - - isMaster: false - os: ubuntu-latest - python-minor-version: 7 - - isMaster: false - os: ubuntu-latest - python-minor-version: 8 - - isMaster: false - os: macos-latest - python-minor-version: 7 - - isMaster: false - os: macos-latest - python-minor-version: 8 - - isMaster: false - os: macos-latest - python-minor-version: 9 - - isMaster: false - os: windows-latest - python-minor-version: 7 - - isMaster: false - os: windows-latest - python-minor-version: 8 - - isMaster: false - os: windows-latest - python-minor-version: 9 + branches: + - '**' + - steps: - - name: Chekout - uses: actions/checkout@v3 - - name: Determine publish - uses: haya14busa/action-cond@v1 - id: publish - with: - cond: ${{ contains(github.ref, 'master') || startsWith(github.ref, 'refs/heads/v') }} - if_true: 'true' - if_false: 'false' - - name: Build and Publish - uses: openalea/action-build-publish-anaconda@v0.1.4 - with: - conda: conda - mamba: false - python: ${{ matrix.python-minor-version }} - numpy: '20.0' - channels: openalea3, conda-forge - token: ${{ secrets.ANACONDA_TOKEN }} - publish: ${{ steps.publish.outputs.value }} - label: main \ No newline at end of file +jobs: + build: + uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@main + with: + conda-channels: openalea3, conda-forge + secrets: + anaconda_token: ${{ secrets.ANACONDA_TOKEN }} diff --git a/setup.py b/setup.py index 01ae87d..49676d2 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages import os, sys from os.path import join as pj @@ -13,9 +13,13 @@ url = 'https://github.com/openalea/weberpenn' license='Cecill-C' -version = '2.1.0' +_version = {} +with open("src/openalea/weberpenn/version.py") as fp: + exec(fp.read(), _version) +version = _version["__version__"] + namespace = 'openalea' -packages=find_packages('src') +packages=find_namespace_packages(where='src', include=['openalea.*']) package_dir={'': 'src'} if __name__ == '__main__': @@ -27,8 +31,6 @@ url=url, license=license, - #namespace_packages=[namespace], - # Packages packages=packages, diff --git a/src/openalea/__init__.py b/src/openalea/__init__.py deleted file mode 100644 index 45f7a25..0000000 --- a/src/openalea/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -import pkg_resources -pkg_resources.declare_namespace(__name__) - diff --git a/src/openalea/weberpenn/version.py b/src/openalea/weberpenn/version.py new file mode 100644 index 0000000..be007aa --- /dev/null +++ b/src/openalea/weberpenn/version.py @@ -0,0 +1,19 @@ +# -*- python -*- +# +# Copyright 2015 INRIA - CIRAD - INRA +# +# Distributed under the Cecill-C License. +# See accompanying file LICENSE.txt or copy at +# http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html +# +# WebSite : https://github.com/openalea-incubator/caribu +# +# ============================================================================== + +# -*- coding: utf-8 -*- + +major = 2 +minor = 2 +post = 0 + +__version__ = ".".join([str(s) for s in (major, minor, post)])