Skip to content

Commit

Permalink
Merge 75b9912 into e186495
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvey3 committed Dec 19, 2022
2 parents e186495 + 75b9912 commit 9791f37
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.bat eol=crlf
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
*deprecated*
*dep*

doc-build

!config_files/**/*.dep

dist

dolfyn.egg-info
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
if errorlevel 1 exit 1
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
3 changes: 3 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lib/
scripts*
bdist*
12 changes: 12 additions & 0 deletions build/conda-build-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
I haven't figured out how to script this because I don't know how to grab the `<version info>` string. Also, it could be risky to scriptify this. So, follow these steps. The commands below assume you're in the repository root folder.

First edit the `meta.yaml` file to point to the version of dolfyn that you want to build. You need to point to a PyPi source to avoid git-lfs errors in conda-build. Also, you'll need to replace `<version info>` in the below commands with the appropriate string.

Then run `conda-build . -o build/conda/`

Then run `conda convert build/conda/dolfyn-<version info>-py27*.tar.bz2 -p osx-64,linux-64,linux-32,win-32,win-64`.

Then upload those files:

anaconda login
anaconda upload build/conda/**/dolfyn-<version-info>-py27*.tar.bz2
2 changes: 2 additions & 0 deletions build/conda/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
23 changes: 23 additions & 0 deletions distribution_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@ Before uploading to the distribution version of PyPi, it is a best practice to:
python3 -m twine upload dist/dolfyn-*


## Upload to Conda

1. Update package version and requirements in meta.yaml
2. Update source url and sha256 from pypi page (https://pypi.org/project/dolfyn/#files)
3. Updated conda, conda-build, and conda-verify

conda update conda conda-build conda-verify anaconda-client

3. Build conda package:

conda-build .

4. Note where package is saved locally (~/miniconda3/conda-bld/linux-64/dolfyn-v1.2.0-py39_0.tar.bz2)

4. Test package:

conda install --use-local dolfyn

5. Upload to anaconda:

anaconda login
anaconda upload <package_local_filepath>

# Building docs

Change directories in a command window:
Expand Down
34 changes: 34 additions & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package:
name: dolfyn
version: v1.2.0

source:
url: https://files.pythonhosted.org/packages/c2/d5/613346df7123cf2e16fbe4f13748bbd26e6840e44391b2d51fdad7fbe173/dolfyn-1.2.0.tar.gz
sha256: c6a81557d4ff6510836a24b0d621a05b4ee35a809249d10aa3ec0c799d589c6a

requirements:
build:
- python=3.9
- setuptools
- numpy>=1.21.0
- scipy>=1.7.0
- xarray>=0.19.0
- netcdf4<1.6.0
- bottleneck

run:
- python
- numpy>=1.21.0
- scipy>=1.7.0
- xarray>=0.19.0
- netcdf4<1.6.0
- bottleneck

test:
imports:
- dolfyn

about:
home: https://lkilcher.github.io/dolfyn/
license: BSD 3-Clause
license_file: License.txt

0 comments on commit 9791f37

Please sign in to comment.