Skip to content

Commit

Permalink
removed build dependency from python3-lxml
Browse files Browse the repository at this point in the history
  • Loading branch information
giuspen committed Oct 18, 2020
1 parent 91cf9d4 commit 08f725d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ before_install:
linux)
sudo apt install build-essential cmake libgtkmm-3.0-dev xvfb
sudo apt install libgtksourceviewmm-3.0-dev libxml++2.6-dev libsqlite3-dev
sudo apt install libcpputest-dev gettext python3-lxml libgspell-1-dev libcurl4-openssl-dev
sudo apt install libcpputest-dev gettext libgspell-1-dev libcurl4-openssl-dev
;;
windows)
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
Expand All @@ -50,15 +50,13 @@ before_install:
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-sqlite3
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-gspell
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-curl
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-python3-lxml
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
export PATH=/C/tools/msys64/mingw64/bin:$PATH
export MAKE=mingw32-make # so that Autotools can find it
;;
osx)
brew update
brew install python3 pip3 cmake pkg-config gtksourceviewmm3 gnome-icon-theme gspell libxml++ cpputest
pip3 install lxml
brew install python3 cmake pkg-config gtksourceviewmm3 gnome-icon-theme gspell libxml++ cpputest
;;
esac
install:
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cpack -G DEB

Install dependencies::
```sh
sudo apt install build-essential libxml2-utils cmake libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev libxml++2.6-dev libsqlite3-dev libcpputest-dev gettext python3-lxml libgspell-1-dev libcurl4-openssl-dev
sudo apt install build-essential libxml2-utils cmake libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev libxml++2.6-dev libsqlite3-dev libcpputest-dev gettext libgspell-1-dev libcurl4-openssl-dev
```
Get cherrytree source, compile and run:
```sh
Expand Down Expand Up @@ -76,7 +76,7 @@ xdg-open /usr/share/doc/libgspell-1-dev/html/index.html

Install dependencies:
```sh
sudo pacman -S gtksourceviewmm libxml++2.6 python-lxml gspell
sudo pacman -S gtksourceviewmm libxml++2.6 gspell
sudo pamac build cpputest
```

Expand All @@ -94,7 +94,7 @@ make -j$(nproc --all)

Installd dependencies:
```sh
sudo dnf install @development-tools gcc-c++ libtool autoconf gtkmm30-devel gtksourceviewmm3-devel libxml++-devel libsq3-devel gettext-devel gettext intltool python3-lxml libxml2 gspell-devel
sudo dnf install @development-tools gcc-c++ libtool autoconf gtkmm30-devel gtksourceviewmm3-devel libxml++-devel libsq3-devel gettext-devel gettext intltool libxml2 gspell-devel
```

Install CppUTest:
Expand Down Expand Up @@ -137,7 +137,6 @@ xdg-open /usr/share/doc/libxml++2.6/reference/html/index.html
Install dependencies:
```sh
brew install python3 cmake pkg-config gtksourceviewmm3 gnome-icon-theme gspell libxml++ cpputest
pip3 install lxml
```

Get cherrytree source, compile and run:
Expand Down Expand Up @@ -173,8 +172,8 @@ Install required packages to build cherrytree:
pacman -S --needed --noconfirm mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
# gtkmm3, gtksourceviewmm3, libxml++2.6, sqlite3, gspell, curl
pacman -S --needed --noconfirm mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-gtksourceviewmm3 mingw-w64-x86_64-libxml++2.6 mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-gspell mingw-w64-x86_64-curl
# python3-lxml, gettext, git, nano, meld3
pacman -S --needed --noconfirm mingw-w64-x86_64-python3-lxml mingw-w64-x86_64-gettext git nano mingw-w64-x86_64-meld3
# gettext, git, nano, meld3
pacman -S --needed --noconfirm mingw-w64-x86_64-gettext git nano mingw-w64-x86_64-meld3
# cpputest (missing package, we need to build manually)
pacman -S --needed --noconfirm autoconf automake libtool make
wget https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz
Expand Down
1 change: 0 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Build-Depends:
debhelper (>= 9),
desktop-file-utils,
gettext,
python3-lxml,
cmake (>= 3.13.2),
libcpputest-dev,
libxml2-utils,
Expand Down
12 changes: 6 additions & 6 deletions scripts/gresource_to_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import subprocess
import glob
from lxml import etree
import xml.etree.ElementTree as ET
import html

SCRIPTS_DIR = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -27,13 +27,13 @@

def main(args):
# write gresource xml
gresources_Element = etree.Element("gresources")
gresource_Element = etree.SubElement(gresources_Element, "gresource", prefix="/icons")
gresources_Element = ET.Element("gresources")
gresource_Element = ET.SubElement(gresources_Element, "gresource", prefix="/icons")
for svg_filepath in glob.glob(os.path.join(ICONS_DIR, "*.svg")):
file_Element = etree.SubElement(gresource_Element, "file", preprocess="xml-stripblanks", compressed="true")
file_Element = ET.SubElement(gresource_Element, "file", preprocess="xml-stripblanks", compressed="true")
file_Element.text = html.escape(os.path.basename(svg_filepath))
gresources_ElementTree = etree.ElementTree(gresources_Element)
gresources_ElementTree.write(GRESOURCE_XML_FILEPATH, xml_declaration=True, encoding='UTF-8', pretty_print=True)
gresources_ElementTree = ET.ElementTree(gresources_Element)
gresources_ElementTree.write(GRESOURCE_XML_FILEPATH, xml_declaration=True, encoding='UTF-8')

# convert gresource xml to source file
shell_cmd = ("glib-compile-resources", "--target="+GRESOURCE_SOURCE_FILEPATH_NOEXT+".cc", "--generate-source", GRESOURCE_XML_FILEPATH)
Expand Down

0 comments on commit 08f725d

Please sign in to comment.