View Issue Details

IDProjectCategoryView StatusLast Update
0004196Talerobsolete componentpublic2016-04-07 13:17
ReporterChristian Grothoff Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Version0.0 
Target Version0.0Fixed in Version0.0 
Summary0004196: need sane build system for bank
DescriptionWe need to have a sane and documented (!) build system following both Pythonic and GNU conventions (GNU configure;make; make install may call pythonic logic).
In particular, 'make dist' should generate a TGZ ready for distribution.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0004201 closedMarcello Stanisci django bank project structure is inadequate 
related to 0004215 closedMarcello Stanisci switch django bank to python3 
related to 0004350 closedMarcello Stanisci bank install process is broken 

Activities

Marcello Stanisci

2016-02-24 16:08

reporter   ~0010177

What is 'configure' supposed to do? The current way of installing the bank makes the user
create a new environment and install everything he needs through 'pip -r requirements.txt',
so there is no need to check for missing dependencies. And even if the user wants to run the
bank in some pre-existing environment of his, he can just use 'requirements.txt' to make his
environment work.

Now, since missing dependencies are handled by 'requirements.txt' (and we provide it), what
is configure's job? Just to *inform* the user of some missing dependency? But that will never
happen after running 'pip -r requirements.txt'. Alternatively, configure could also check for
packages and if something is missing suggest to run 'pip -r requirements.txt', but that sounds
like an extra (unneded) step, since the user can simply run it in the first place

An option can be that configure takes one arguments like '--with-environment' and runs
'pip -r requirements.txt' on the environment, but in this case it installs stuff, which
is not its main 'raison d'etre'

Marcello Stanisci

2016-02-24 16:16

reporter   ~0010178

PS. there is also apparently no way to programmatically compare
packages versions with pip, so that should be done via string manipulation
with sed/grep/awk; alternatively, configure can call a dedicated python
program that checks for packages versions. Anyway, is it convenient to perform
such checks just to invite the user to run 'pip -r requirements.txt' ?

Christian Grothoff

2016-02-24 16:17

manager   ~0010179

Eh, for starters, you do depend on "pip", some Python.h header (see python-dev failure) and on Python 2.7. That's what configure should check that it is around, and if not complain.

Then, we should have a "Makefile" which runs the commands to build (i.e. create the environment, run the build commands) the source.

Running stays the same, and for packaging we can probably just find some 'tar' command that does the right thing.

Marcello Stanisci

2016-02-24 18:12

reporter   ~0010186

So "Makefile" should *download and install* things via 'pip install -r requirements.txt': *that*
is 'creating the environment' in our case, but that is not 'make's main job.

Also, given that git hosts the whole project (the 'TalerBank/' directory), there
is not very much to 'build', but just (as you say) having the right environment set up.

The would be another way such that our Makefile packs a so called 'reusable app'
and installs that on some user's django project but it seems that the user still
needs to manually "patch" its project, see paragraph
'Create a file django-polls/README.rst with the following contents:' at [1]
A way to avoid the manual patching could be that our Makefile generates a new django project
on the user's system and then installs the bank within that project, but that is equivalent
to just copy 'TalerBank/' somewhere (and maybe is not very respectuful of django's guidelines)
in the user's system.

[1] https://docs.djangoproject.com/en/1.9/intro/reusable-apps/

Florian Dold

2016-03-02 00:46

manager   ~0010207

For the "make dist", see this:

https://docs.python.org/3/distutils/sourcedist.html
https://pythonhosted.org/setuptools/setuptools.html#generating-source-distributions

Christian Grothoff

2016-03-15 19:17

manager   ~0010243

'make dist' now exists, but doesn't use the Pythonic ways. So I'll leave this open for now.

Marcello Stanisci

2016-04-07 13:01

reporter   ~0010400

The current setup installs all the python code ('manage.py' too, which is the "main") via setuptools, and only the final shell scripts are installed by 'cp'
from the Makefile. The virtualenv management has been totally removed from the
compilation/installation process. INSTALL text file will be updated accordingly

Issue History

Date ModifiedUsernameFieldChange
2016-02-19 20:47Christian GrothoffNew Issue
2016-02-19 20:47Christian GrothoffStatusnew => assigned
2016-02-19 20:47Christian GrothoffAssigned To => Marcello Stanisci
2016-02-24 13:05Marcello StanisciRelationship addedrelated to 0004201
2016-02-24 16:08Marcello StanisciNote Added: 0010177
2016-02-24 16:16Marcello StanisciNote Added: 0010178
2016-02-24 16:17Christian GrothoffNote Added: 0010179
2016-02-24 18:12Marcello StanisciNote Added: 0010186
2016-03-02 00:46Florian DoldNote Added: 0010207
2016-03-04 12:17Christian GrothoffRelationship addedrelated to 0004215
2016-03-15 19:17Christian GrothoffNote Added: 0010243
2016-03-15 19:17Christian GrothoffTarget Version0.0 => 0.1
2016-03-20 20:53Torsten GrothoffIssue cloned: 0004265
2016-04-07 12:57Marcello StanisciRelationship addedrelated to 0004350
2016-04-07 13:01Marcello StanisciNote Added: 0010400
2016-04-07 13:01Marcello StanisciStatusassigned => informing
2016-04-07 13:01Marcello StanisciResolutionopen => fixed
2016-04-07 13:17Christian GrothoffFixed in Version => 0.0
2016-04-07 13:17Christian GrothoffTarget Version0.1 => 0.0
2016-04-07 13:17Christian GrothoffStatusinforming => closed
2022-08-23 18:26Christian GrothoffCategorybank (demonstrator) => py bank (demonstrator, obsolete)
2023-12-03 00:23Christian GrothoffCategorypy bank (demonstrator, obsolete) => obsolete componet
2023-12-11 19:08Florian DoldCategoryobsolete componet => obsolete component