Skip to content

Commit

Permalink
setup.py: install .desktop files, re-organized doc files to data
Browse files Browse the repository at this point in the history
  • Loading branch information
kbumsik committed May 23, 2018
1 parent be02f3d commit b8caf68
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 8 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ include *.md

# Include the license file
include LICENSE.txt

# Include data directories
include data/virtscreen.png
include data/virtscreen.desktop
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
.PHONY:

python-wheel:
python setup.py bdist_wheel --universal
/usr/bin/python3 setup.py bdist_wheel --universal

python-install:
python setup.py install --user
sudo /usr/bin/python3 setup.py install

python-uninstall:
sudo /usr/bin/pip3 uninstall virtscreen
sudo rm /usr/share/applications/virtscreen.desktop
sudo rm /usr/share/pixmaps/virtscreen.png

pip-upload: python-wheel
twine upload dist/*
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Make your iPad/tablet/computer as a secondary monitor on Linux.
![gif example](https://github.com/kbumsik/VirtScreen/blob/d2387d3321bd4d110d890ca87703196df203dc89/icon/gif_example.gif?raw=true)
![gif example](https://raw.githubusercontent.com/kbumsik/VirtScreen/master/data/gif_example.gif)

VirtScreen is an easy-to-use Linux GUI app that creates a virtual secondary screen and shares it through VNC.

Expand All @@ -12,7 +12,7 @@ VirtScreen is based on [PyQt5](https://www.riverbankcomputing.com/software/pyqt/

Upon installation (see Installing section to install), there will be a desktop entry called `virtscreen`

![desktop entry](doc/desktop_entry.png)
![desktop entry](https://raw.githubusercontent.com/kbumsik/VirtScreen/master/data/desktop_entry.png)

Or you can run it using a command line:

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Binary file added data/virtscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions package/archlinux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ build() {
package() {
cd $_pkgname_camelcase-$pkgver
/usr/bin/python3 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "$pkgname/icon/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
# These are already installed by setup.py
# install -Dm644 "data/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
# install -Dm644 "data/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,13 @@
# http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
#
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data'

# data_files=[('my_data', ['data/data_file'])], # Optional
data_files=[
# Desktop entries spec:
# https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/
('/usr/share/applications', ['data/virtscreen.desktop']),
('/usr/share/pixmaps', ['data/virtscreen.png']),
# ('share/man/man1', ['man/virtscreen.1'])
], # Optional

# To provide executable scripts, use entry points in preference to the
# "scripts" keyword. Entry points provide cross-platform support and allow
Expand Down

0 comments on commit b8caf68

Please sign in to comment.