Closed lapisdecor closed 4 years ago
Hey @lapisdecor! Thanks for the contribution! Code is looking good! How are you planning to package it up?
Hey @lapisdecor! Thanks for the contribution! Code is looking good! How are you planning to package it up?
I'm thinking about making a snap.
Can you post the snap here? I'll go through the code and create a new release today 🤓
The snap will take some time to make, it's not trivial. As soon as I can I'll post it here.
Great! Once you do, we can add the code and the snap to the release :)
Great! Once you do, we can add the code and the snap to the release :)
I'm having some trouble with setup.py. I've changed it to choose between Mac and Linux but snapcraft tries to install rumps on linux anyway.
Humm can't you specify the directory?
The snap is basically done, the only problem is setup.py because snapcraft will search for packages and try to install them. There wouldn't be a problem if the setup.py file was only made for Ubuntu purposes, but I kept your code, here's my setup.py
from setuptools import setup, find_packages
import sys
APP = []
DATA_FILES = []
OPTIONS = {}
SETUP = []
INSTALL = []
SCRIPT = []
if sys.platform.startswith('darwin'):
APP = ['app.py']
DATA_FILES = []
OPTIONS = {'py2app': {
'argv_emulation': True,
'iconfile': 'icon.icns',
'plist': {
'CFBundleShortVersionString': '0.2.0',
'LSUIElement': True,
},
'packages': ['rumps', 'requests'],
}}
SETUP = ['py2app']
INSTALL = ['rumps', 'requests']
SCRIPT = []
elif sys.platform.startswith('linux'):
APP = ['app.py']
DATA_FILES = []
OPTIONS = {
'packages': [],
}
SETUP = []
SCRIPT = ['bin/coronabar']
setup(
app=APP,
name='CoronaBar',
data_files=DATA_FILES,
options=OPTIONS,
setup_requires=SETUP,
install_requires=INSTALL,
scripts=SCRIPT
)
@lapisdecor eu devo por o teu codigo num folder "linux", portanto cria um setup.py
. Não faz sentido usarmos o mesmosetup.py
se estivermos a compilar para duas plataformas com duas ferramentas differentes.
@lapisdecor eu devo por o teu codigo num folder "linux", portanto cria um
setup.py
. Não faz sentido usarmos o mesmosetup.py
se estivermos a compilar para duas plataformas com duas ferramentas differentes.
I already have my code on a Ubuntu folder, maybe there should be a mac folder too, but I'm not sure how snapcraft behaves if it doesn't find setup.py on the top directory. I will try 'snacrafting' from inside Ubuntu directory with setup.py there and see what happens.
The snap is now working (with the conditional setup.py) I'm testing it.
Está a funcionar no Ubuntu, já coloquei na loja. Podes testar com
sudo snap install coronabar --edge
To test please install the dependencies stated on README.md. To run: