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

Fixes for ruamel_yaml #57

Merged
merged 7 commits into from
Nov 18, 2016
Merged

Conversation

jakirkham
Copy link
Contributor

  • Fixes the version patching.
  • Uses a tarball with checksum for the source.
  • Adds a bit more metadata.

requirements:
build:
- python
- setuptools
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we run python setup.py --version to get the version before patching, we need to meet ruamel.yaml's requirements for setup.py to run. This means we need setuptools. Without this requirement, this command will fail and the VERSION environment variable will be empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should note that as the setup.py file we replace the existing one with does not require setuptools, we do not need to add --single-version-externally-managed --record=record.txt.

@@ -25,4 +25,4 @@ touch $SRC_DIR/ruamel_yaml/ext/__init__.py

cp $RECIPE_DIR/setup.py $SRC_DIR/
cp $RECIPE_DIR/__init__.py $SRC_DIR/ruamel_yaml/
sed -i -e 's/__version__.*/__version__ = "$VERSION"/' $SRC_DIR/ruamel_yaml/__init__.py
sed -i -e "s/__version__.*/__version__ = "'"'"${VERSION}"'"'"/" $SRC_DIR/ruamel_yaml/__init__.py
Copy link
Contributor Author

@jakirkham jakirkham Nov 7, 2016

Choose a reason for hiding this comment

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

As single quotes were in use already, we are unable to inject the version from the environment variable $VERSION. Instead we just literally write $VERSION. Here we switch to double quotes so that is not an issue and escape them so that the $VERSION can be written into a Python string.

@@ -1,7 +1,7 @@
# coding: utf-8
from __future__ import print_function, absolute_import

__version__ = "0.11.7"
__version__ = "$VERSION"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not strictly required. However, the sed expression would already replace this line with this change. Plus this makes it more clear to the end user what is happening with this version info. Namely it is being patched out with the contents of the $VERSION environment variable.

source:
fn: ruamel_yaml-0.11.14.tar.gz
url: https://bitbucket.org/ruamel/yaml/get/0.11.14.tar.gz
sha256: b78d394e192b6d0911bd59f794ceea88143fac4e373b76ed7e48143a2a29b33c
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We prefer tarballs at conda-forge and this ordering. So figured we could match this up a bit more to our expectations if there is no strong preference.

@@ -29,4 +31,6 @@ test:
about:
home: https://bitbucket.org/ruamel/yaml
license: MIT
license_family: MIT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adds the license_family. 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

license_family defaults to license, so it is not necessary here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know.

Any chance we can get this or any of these other fields documented? Right now the about docs only really mention license_file, but nothing about license_family, doc_url, or dev_url. It would also be good to know if there are any other special cases like this (e.g. BSD?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: Dropped license_family per request.

license_file: LICENSE
summary: A patched copy of ruamel.yaml.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Figured there should be some explanation of what this is as it has caused confusion before.

xref: conda-forge/ruamel_yaml-feedstock#1
xref: conda-forge/ruamel.yaml-feedstock#7

@jakirkham
Copy link
Contributor Author

Anything else before this can be merged?

@ilanschnell
Copy link
Contributor

Thanks, looks good!

@ilanschnell ilanschnell merged commit 3db74d6 into ContinuumIO:master Nov 18, 2016
@jakirkham jakirkham deleted the fixes_ruamel_yaml branch November 18, 2016 06:38
@jakirkham jakirkham mentioned this pull request Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants