You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/index.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,10 +119,15 @@ Browse references
119
119
120
120
## {fa}`cubes` Registry
121
121
122
-
There are already many packages available for use with fpm, providing an easily accessible and rich ecosystem of general purpose and high-performance code.
123
-
For a full list of packages checkout the [fpm registry](registry/index).
124
-
New packages can be submitted to the registry [here](https://github.com/fortran-lang/fpm-registry).
122
+
<!-- TODO: add short description -->
125
123
124
+
Read about the [fpm registry](registry/index) and how to use it.
125
+
126
+
::::{note}
127
+
The online registry as part of fpm
128
+
is currently under active development and the online documentation might not be
The registry settings can be used to customize the registry for all projects. If no registry is specified, the packages will be fetched via HTTP from the [official registry](https://registry-frontend.vercel.app/). The registry settings are specified in the
The global configuration file can be used to set default options across all fpm projects on the system. It is, by default, located at `~/.local/share/fpm/config.toml` on Unix-like machines and `%APPDATA%\local\fpm\config.toml` on Windows and must be parsable to a TOML structure. It can be used to configure [registry settings](#settings).
10
+
11
+
## Registry cache
12
+
13
+
The registry cache contains the source code of previously downloaded packages. It will first be searched for existing packages that satify the requirements of the requesting project before the package is downloaded. The default cache location is `~/.local/share/fpm/dependencies` on Unix-like machines and `%APPDATA%\local\fpm\dependencies` on
14
+
Windows. The location of the cache can be changed by setting the `cache_path` in the global config file:
15
+
16
+
```toml
17
+
[registry]
18
+
cache_path = "/path/to/cache"
19
+
```
20
+
21
+
## Custom registry
22
+
23
+
If you want to use a custom registry, you can specify it in the global config file:
24
+
25
+
```toml
26
+
[registry]
27
+
url = "https://my-registry.com"
28
+
```
29
+
30
+
Your registry must implement the same [API](https://registry-apis.vercel.app/apidocs/) as the official registry.
31
+
32
+
## Local registry
33
+
34
+
Use the following configuration if you want to set up a local registry:
35
+
36
+
```toml
37
+
[registry]
38
+
path = "/path/to/registry"
39
+
```
40
+
41
+
fpm will search this directory for packages and will not download packages from the internet or fetch packages from the cache.
42
+
43
+
The directory must be structured the way fpm expects it to be. A package must be located in a directory named after the namespace name, followed by the name of the package and the package version. For example, the package `my-package` with version `0.1.0`, which is part of `my-namespace`, must be located in the directory `<path_to_local_registry>/my-namespace/my-package/0.1.0` on Unix-like systems. The package directory must contain an `fpm.toml` file that has the package metadata. The manifest must therefore be located at `<path_to_local_registry>/my-namespace/my-package/0.1.0/fpm.toml`.
44
+
45
+
If a specific version is requested, fpm will look for that version in the local registry. If you do not specify a version, fpm will look for the version with the highest precedence.
46
+
47
+
For instructions on how to set up **project dependencies** in `fpm.toml` when using a registry see
Copy file name to clipboardExpand all lines: pages/spec/manifest.md
+26-65Lines changed: 26 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -480,71 +480,6 @@ Dependencies can be declared in the *dependencies* table in the manifest root or
480
480
When declared in the manifest root the dependencies are exported with the project.
481
481
482
482
483
-
### Local dependencies
484
-
485
-
To declare local dependencies use the *path* entry.
486
-
487
-
```toml
488
-
[dependencies]
489
-
my-utils = { path = "utils" }
490
-
```
491
-
492
-
The local dependency path is given relative to the ``fpm.toml`` it is written to, and uses ``/`` as the path separator on all platforms.
493
-
494
-
### Dependency-specific macro setting
495
-
496
-
As of ``fpm>=0.9.1``, an array of dependency-specific macros can be passed to a single dependency from the manifest, in the same fashion as in the manifest's [preprocessor configuration](#preprocessor-configuration) table. Its `preprocess` table needs to be entered as part of the dependency entry. fpm will not check if the passed macros collide with the dependencie's own manifest, so, it is the user's responsibility to ensure that no collisions or unexpected behavior occur.
497
-
For example, one can control the `REAL` precision that one library is to be used with:
The global configuration file can be used to set default options across all fpm projects on the system. It is, by default, located at `~/.local/share/fpm/config.toml` on Unix-like machines and `%APPDATA%\local\fpm\config.toml` on Windows and must be parsable to a TOML structure. It can be used to configure [registry settings](#registry-settings).
507
-
508
-
## Registry settings
509
-
510
-
The registry settings can be used to customize the registry for all projects. If no registry is specified, the packages will be fetched via HTTP from the [official registry](https://registry-frontend.vercel.app/). The registry settings are specified in the [global config file](#global-config-file).
511
-
512
-
### Registry cache
513
-
514
-
The registry cache contains the source code of previously downloaded packages. It will first be searched for existing packages that satify the requirements of the requesting project before the package is downloaded. The default cache location is `~/.local/share/fpm/dependencies` on Unix-like machines and `%APPDATA%\local\fpm\dependencies` on
515
-
Windows. The location of the cache can be changed by setting the `cache_path` in the global config file:
516
-
517
-
```toml
518
-
[registry]
519
-
cache_path = "/path/to/cache"
520
-
```
521
-
522
-
### Custom registry
523
-
524
-
If you want to use a custom registry, you can specify it in the global config file:
525
-
526
-
```toml
527
-
[registry]
528
-
url = "https://my-registry.com"
529
-
```
530
-
531
-
Your registry must implement the same [API](https://registry-apis.vercel.app/apidocs/) as the official registry.
532
-
533
-
### Local registry
534
-
535
-
Use the following configuration if you want to set up a local registry:
536
-
537
-
```toml
538
-
[registry]
539
-
path = "/path/to/registry"
540
-
```
541
-
542
-
fpm will search this directory for packages and will not download packages from the internet or fetch packages from the cache.
543
-
544
-
The directory must be structured the way fpm expects it to be. A package must be located in a directory named after the namespace name, followed by the name of the package and the package version. For example, the package `my-package` with version `0.1.0`, which is part of `my-namespace`, must be located in the directory `<path_to_local_registry>/my-namespace/my-package/0.1.0` on Unix-like systems. The package directory must contain an `fpm.toml` file that has the package metadata. The manifest must therefore be located at `<path_to_local_registry>/my-namespace/my-package/0.1.0/fpm.toml`.
545
-
546
-
If a specific [version](#version) is requested, fpm will look for that version in the local registry. If you do not specify a version, fpm will look for the version with the highest precedence.
547
-
548
483
### Dependencies from version control systems
549
484
550
485
Dependencies can be specified by the projects git repository.
To enable the usage of a registry in fpm make sure you read the instructions
525
+
in the [registry section](../registry/index.md) first.
526
+
:::
527
+
588
528
#### Namespace
589
529
590
530
Packages obtained from a registry (both remote and local) are required to specify a namespace, which provides a way to uniquely identify and differentiate packages with identical names. The namespace is declared in the manifest (`fpm.toml`).
To declare local dependencies use the *path* entry.
552
+
553
+
```toml
554
+
[dependencies]
555
+
my-utils = { path = "utils" }
556
+
```
557
+
558
+
The local dependency path is given relative to the ``fpm.toml`` it is written to, and uses ``/`` as the path separator on all platforms.
559
+
560
+
### Dependency-specific macro setting
561
+
562
+
As of ``fpm>=0.9.1``, an array of dependency-specific macros can be passed to a single dependency from the manifest, in the same fashion as in the manifest's [preprocessor configuration](#preprocessor-configuration) table. Its `preprocess` table needs to be entered as part of the dependency entry. fpm will not check if the passed macros collide with the dependencie's own manifest, so, it is the user's responsibility to ensure that no collisions or unexpected behavior occur.
563
+
For example, one can control the `REAL` precision that one library is to be used with:
0 commit comments