You are not logged in.

#1 2016-07-29 00:12:27

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 134

Best method to add a python package as a dependancy to AUR package

I want to add some functionality to my stock_quote package by adding a python module (yahoo-finance) and I do not see an existing package for yahoo-finance.

Is the preferred method to create an AUR package for yahoo-finance and add it as a dependency or is there a way I can call "pip install yahoo-finance" in my PKGBUILD file?

If the former is preferred, does anyone have examples of how to package a python package for arch.

Sorry if this is noob question.

Offline

#2 2016-07-29 01:31:30

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Best method to add a python package as a dependancy to AUR package

Best to install as a package
Here's the biopython PKGBUILD as an example https://git.archlinux.org/svntogit/comm … -biopython

Offline

#3 2016-07-29 05:35:19

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 134

Re: Best method to add a python package as a dependancy to AUR package

Thanks, but yikes. That seems more complex than writing a new function (which defeats the purpose of OOP). Is there an easier way?

Offline

#4 2016-07-29 06:18:38

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Best method to add a python package as a dependancy to AUR package

gps1539 wrote:

Thanks, but yikes. That seems more complex than writing a new function (which defeats the purpose of OOP). Is there an easier way?

You're conflating the issue of writing your python program and the issue of packaging it. Your python code can just import the module (and if you're putting it on pypi you'll need to include dependency information there).

Packaging for Arch is what the above link is about. Not coding or development.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2016-08-03 01:20:05

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 134

Re: Best method to add a python package as a dependancy to AUR package

ngoonee wrote:
gps1539 wrote:

Thanks, but yikes. That seems more complex than writing a new function (which defeats the purpose of OOP). Is there an easier way?

You're conflating the issue of writing your python program and the issue of packaging it. Your python code can just import the module (and if you're putting it on pypi you'll need to include dependency information there).

Packaging for Arch is what the above link is about. Not coding or development.


Sure python can import the module, but the module has to be installed on the OS 1st.
My code uses numpy and a few others that I import, these have arch packages that I list as dependencies. Alas yahoo-finance is not available for arch and I was hoping to use that to add a feature.

Offline

#6 2016-08-03 05:21:48

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,842
Website

Re: Best method to add a python package as a dependancy to AUR package

So you package it, upload it to the AUR, and add it to the depends array of your package. The benefit of doing this is that the next person who writes a python script that wants to use yahoo-finance doesn't have the same dilemma, and neither of you have to reinvent the wheel.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB