Commit f3774bc6 authored by notklaatu's avatar notklaatu

path correction

parent 56c3c65f
......@@ -10,19 +10,24 @@ import site
launch_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
#print("Launch script dir: ", launch_dir)
PYTHONDIR = site.getsitepackages()[0]
# index 0 is usr local blah
# index 1 is usr lib(64) blah
PYTHONDIR = site.getsitepackages()[2]
print(PYTHONDIR) #DEBUG
# Update sys.path to include modules
d = 'planter'
if launch_dir == "/usr/bin":
print("Running from installation...")
modules_path = os.path.join(PYTHONDIR,"d")
modules_path = os.path.join(PYTHONDIR,d)
print(modules_path) #DEBUG
else:
print("Running from filesystem...")
modules_path = os.path.join(launch_dir,"usr","lib","python3","site-packages",d)
sys.path.insert(0, modules_path)
# Get app.py module
sys.path.insert(0, modules_path)
#try:
import app
#except Exception:
......
......@@ -3,13 +3,13 @@
%global pylibdir %{_libdir}/python%{pybasever}
Name: planter
Version: 1.6
Version: 1.6.1
Release: 1%{?dist}
Summary: Project directory planter
License: GPLv3
URL: http://www.slackermedia.info/planter
Source0: https://gitlab.com/%{name}/%{name}/repository/archive.tar.gz?ref=%{version}#/%{name}-%{version}-%{commit0}.tar.gz
Source0: https://gitlab.com/%{name}/%{name}/repository/archive.tar.gz?ref=%{version}#/%{name}-%{version}-%{commit0}.tar.bz2
BuildRequires: desktop-file-utils
Requires: python3-qt5
......@@ -36,8 +36,8 @@ install -Dm 755 etc/%{name}/* %{buildroot}/%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_mandir}/man8
cat usr/man/man8/%{name}.8 | gzip > %{buildroot}%{_mandir}/man8/%{name}.8.gz
mkdir -p %{buildroot}%{pylibdir}/site-packages/planterlibs
install -Dm 755 usr/share/pyshared/planterlibs/*py %{buildroot}%{pylibdir}/site-packages/planterlibs
mkdir -p %{buildroot}%{pylibdir}/site-packages/%{name}
install -Dm 755 usr/lib/python3/site-packages/%{name}/*py %{buildroot}%{pylibdir}/site-packages/%{name}
mkdir -p %{buildroot}%{_bindir}
install -m 755 %{name} %{buildroot}%{_bindir}
......@@ -57,7 +57,7 @@ desktop-file-install \
%{_docdir}/%{name}/COPYING
%{_docdir}/%{name}/AUTHORS
%{_docdir}/%{name}/README
%{pylibdir}/site-packages/planterlibs
%{pylibdir}/site-packages/%{name}
%{_datadir}/pixmaps/%{name}.svg
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
......@@ -67,5 +67,10 @@ desktop-file-install \
%changelog
* Mon Jan 08 2018 Klaatu <klaatu@fedorapeople.org> - 1.6.
- Still fixing paths
* Mon Jan 08 2018 Klaatu <klaatu@fedorapeople.org> - 1.6
- RPM update for F27
- Better conformed to Python filesystem paths
* Mon Jul 03 2017 Klaatu <klaatu@fedorapeople.org> - 1.5.0
- RPM installer
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment