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 Arch Linux install instructions #58

Open
wants to merge 8 commits 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
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dist_check:
options:
exclude:
- ["v:3.6", "pkg:old"] ## old version is breaking python 3.6 pkg_resources
- ["v:3.7", "pkg:old"] ## old version is breaking python 3.7 pkg_resources
tests:
- label: install
matrix:
Expand Down Expand Up @@ -80,7 +81,7 @@ dist_check:
EOF
- |
cd /tmp
echo PYTHONPATH: $PYTHONPATH
echo PYTHONPATH: "${PYTHONPATH:-<empty>}"
python -c 'import shyaml'
- |
[ -e /tmp/not-installed ] || {
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2018, Valentin Lab
Copyright (c) 2012-2019, Valentin Lab
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ On macOS, you can also install the latest release version via `Homebrew
Or to install the master branch::

brew install shyaml --HEAD

On Arch Linux you can install via `yay`::

yay --sync shyaml


Documentation
Expand All @@ -83,7 +87,7 @@ implementation but some examples will fail depending on the
implementation. To make things clear, I'll use some annotation and you
can yourself check which version you are using with::

$ shyaml -V | grep "^libyaml used:" ## shtest: if-success-set LIBYAML
$ shyaml -V | grep "^libyaml used:" ## docshtest: if-success-set LIBYAML
libyaml used: True


Expand Down Expand Up @@ -153,7 +157,7 @@ Get sub YAML from a structure attribute::

$ cat test.yaml | shyaml get-type subvalue
struct
$ cat test.yaml | shyaml get-value subvalue ## shtest: ignore-if LIBYAML
$ cat test.yaml | shyaml get-value subvalue ## docshtest: ignore-if LIBYAML
how-much: 1.1
how-many: 2
things:
Expand Down Expand Up @@ -535,7 +539,7 @@ an error message will be printed::
$ echo "a: 3" | shyaml get-value b
Error: invalid path 'b', missing key 'b' in struct.

You can emulate pre v0.3 behavior by specifying explicitely an empty
You can emulate pre v0.3 behavior by specifying explicitly an empty
string as third argument::

$ echo "a: 3" | shyaml get-value b ''
Expand Down Expand Up @@ -603,7 +607,7 @@ when processing YAML coming out of shyaml, you should probably think
about using the ``--yaml`` (or ``-y``) option to output only strict YAML.

With the drawback that when you'll want to output string, you'll need to
call a last time ``shyaml get-value`` to explicitely unquote the YAML.
call a last time ``shyaml get-value`` to explicitly unquote the YAML.


Object Tag
Expand All @@ -629,7 +633,7 @@ allow parsing their internal structure.
``get-value`` with ``-y`` (see section Strict YAML) will give you the
complete yaml tagged value::

$ shyaml get-value -y 0 < test.yaml ## shtest: ignore-if LIBYAML
$ shyaml get-value -y 0 < test.yaml ## docshtest: ignore-if LIBYAML
!<tag:example.com,2000:app/foo> 'bar'


Expand Down Expand Up @@ -678,7 +682,7 @@ Note that all global tags will be resolved and simplified (as
}
EOF

$ shyaml get-value < test.yaml ## shtest: ignore-if LIBYAML
$ shyaml get-value < test.yaml ## docshtest: ignore-if LIBYAML
sequence:
- one
- two
Expand Down Expand Up @@ -905,7 +909,7 @@ would show you how to deal with your issue.
License
=======

Copyright (c) 2018 Valentin Lab.
Copyright (c) 2019 Valentin Lab.

Licensed under the `BSD License`_.

Expand Down
9 changes: 5 additions & 4 deletions bin/test
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
#!/bin/bash

shtest_opts=()
docshtest_opts=()

if [ -z "$DOVIS" -o "$PKG_COVERAGE" ]; then ## with coverage
echo "With coverage support enabled"
python="coverage run --include ./shyaml.py -a"
shtest_opts+=("-r" '#\bshyaml\b#'"$coverage"' shyaml#')
else
echo "No coverage support"
python=python
fi

docshtest_opts+=("-r" '#\bshyaml\b#'"$python"' ./shyaml.py#')

$python -m doctest shyaml.py || exit 1
$python -m doctest README.rst || exit 1

if python -c 'import yaml; exit(0 if yaml.__with_libyaml__ else 1)' 2>/dev/null; then
echo "PyYAML has C libyaml bindings available... Testing with libyaml"
export FORCE_PYTHON_YAML_IMPLEMENTATION=
time ./shtest.py README.rst -r '#\bshyaml\b#'"$python"' ./shyaml.py#' || exit 1
time docshtest README.rst "${docshtest_opts[@]}" || exit 1
else
echo "PyYAML has NOT any C libyaml bindings available..."
fi
echo "Testing with python implementation"
export FORCE_PYTHON_YAML_IMPLEMENTATION=1
time ./shtest.py README.rst -r '#\bshyaml\b#'"$python"' ./shyaml.py#' || exit 1
time docshtest README.rst "${docshtest_opts[@]}" || exit 1
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@

setup(
setup_requires=['d2to1'],
extras_require={'test': []},
extras_require={'test': [
"docshtest==0.0.2",
]},
d2to1=True
)
Loading