View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004196 | Taler | obsolete component | public | 2016-02-19 21:47 | 2016-04-07 15:17 |
| Reporter | Christian Grothoff | Assigned To | Marcello Stanisci | ||
| Priority | high | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Platform | i7 | OS | Debian GNU/Linux | OS Version | squeeze |
| Product Version | 0.0 | ||||
| Target Version | 0.0 | Fixed in Version | 0.0 | ||
| Summary | 0004196: need sane build system for bank | ||||
| Description | We 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. | ||||
| Tags | No tags attached. | ||||
| related to | 0004201 | closed | Marcello Stanisci | django bank project structure is inadequate |
| related to | 0004215 | closed | Marcello Stanisci | switch django bank to python3 |
| related to | 0004350 | closed | Marcello Stanisci | bank install process is broken |
|
|
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' |
|
|
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' ? |
|
|
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. |
|
|
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/ |
|
|
For the "make dist", see this: https://docs.python.org/3/distutils/sourcedist.html https://pythonhosted.org/setuptools/setuptools.html#generating-source-distributions |
|
|
'make dist' now exists, but doesn't use the Pythonic ways. So I'll leave this open for now. |
|
|
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 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-02-19 21:47 | Christian Grothoff | New Issue | |
| 2016-02-19 21:47 | Christian Grothoff | Status | new => assigned |
| 2016-02-19 21:47 | Christian Grothoff | Assigned To | => Marcello Stanisci |
| 2016-02-24 14:05 | Marcello Stanisci | Relationship added | related to 0004201 |
| 2016-02-24 17:08 | Marcello Stanisci | Note Added: 0010177 | |
| 2016-02-24 17:16 | Marcello Stanisci | Note Added: 0010178 | |
| 2016-02-24 17:17 | Christian Grothoff | Note Added: 0010179 | |
| 2016-02-24 19:12 | Marcello Stanisci | Note Added: 0010186 | |
| 2016-03-02 01:46 | Florian Dold | Note Added: 0010207 | |
| 2016-03-04 13:17 | Christian Grothoff | Relationship added | related to 0004215 |
| 2016-03-15 20:17 | Christian Grothoff | Note Added: 0010243 | |
| 2016-03-15 20:17 | Christian Grothoff | Target Version | 0.0 => 0.1 |
| 2016-03-20 21:53 | Torsten Grothoff | Issue cloned: 0004265 | |
| 2016-04-07 14:57 | Marcello Stanisci | Relationship added | related to 0004350 |
| 2016-04-07 15:01 | Marcello Stanisci | Note Added: 0010400 | |
| 2016-04-07 15:01 | Marcello Stanisci | Status | assigned => resolved |
| 2016-04-07 15:01 | Marcello Stanisci | Resolution | open => fixed |
| 2016-04-07 15:17 | Christian Grothoff | Fixed in Version | => 0.0 |
| 2016-04-07 15:17 | Christian Grothoff | Target Version | 0.1 => 0.0 |
| 2016-04-07 15:17 | Christian Grothoff | Status | resolved => closed |
| 2022-08-23 20:26 | Christian Grothoff | Category | bank (demonstrator) => py bank (demonstrator, obsolete) |
| 2023-12-03 01:23 | Christian Grothoff | Category | py bank (demonstrator, obsolete) => obsolete componet |
| 2023-12-11 20:08 | Florian Dold | Category | obsolete componet => obsolete component |