Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python_requires>=3.6 and a conda recipe #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This recipe can be used to directly build a conda package for this project.
# There is already a conda-forge feedstock for this project that pulls from pypi,
# so this recipe is only needed if you want to build and deply a copy of this
# package in your own channel.

{% set data = load_setup_py_data() %} # copy parameters from setup.py

package:
name: conda-mirror
version: {{ data['version'] }}

source:
path: ..

build:
script: python setup.py install --single-version-externally-managed --record=record.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
script: python setup.py install --single-version-externally-managed --record=record.txt
script: pip install -vv .

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes actually break the script install. It ends up requiring the version of python used to build it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recipe produces a noarch python recipe that can be installed on any platform or supported version of python. But if the suggested changes are made, the resulting conda-recipe script will only be runnable on the version of python it was built on.


noarch: python

requirements:
build:
- python {{ data['python_requires'] }}
- setuptools
analog-cbarber marked this conversation as resolved.
Show resolved Hide resolved

run:
- python {{ data['python_requires'] }}

{% for dep in data['install_requires'] %}
- {{ dep.lower() }}
{% endfor %}

test:
commands:
- conda-mirror -h

about:
home: {{ data['url'] }}
license: {{ data['license'] }}
description: {{ data['description'] }}
summary: {{ data['description'] }}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
platforms=["Linux", "Mac OSX", "Windows"],
license="BSD 3-Clause",
install_requires=["requests", "pyyaml", "tqdm"],
python_requires=">=3.6",
entry_points={
"console_scripts": [
"conda-mirror = conda_mirror.conda_mirror:cli",
Expand Down