# Local package dependency

**URL:** <https://fortran-lang.discourse.group/t/local-package-dependency/6558>\
**Category:** fpm\
**Created:** [September 25, 2023, 12:55pm UTC](https://fortran-lang.discourse.group/t/local-package-dependency/6558 "2023-09-25T12:55:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamuG](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@SamuG](https://fortran-lang.discourse.group/u/SamuG)\
**Post date:** [September 25, 2023, 12:55pm UTC](https://fortran-lang.discourse.group/t/local-package-dependency/6558/1 "2023-09-25T12:55:35Z")

</div>

Hello everyone!

I am trying to use fpm for a local project for which I require another local package that has been build with fpm. I tried to add the latter as a dependency passing in the .toml the full path of the directory but it doesn’t seem to work. I couldn’t find any info or example on this case, am missing something? Is it impossible to pass local dependencies?

An example of what I had in the .toml file:

[dependencies]  
stdlib = “\*”  
mypackage=“path/to/mypackage”

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [September 25, 2023, 1:02pm UTC](https://fortran-lang.discourse.group/t/local-package-dependency/6558/2 "2023-09-25T13:02:49Z")

</div>

The syntax is:

```toml
[dependencies]
mypackage = { path = "../mypackage" }

```

(supposing here that the subdirectory mypackage is in the same directory as your project subdirectory.)

Welcome to the Discourse!

---

<div class="post-metadata">

**Author:** ![epagone](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/epagone/32/252_2.png) [@epagone](https://fortran-lang.discourse.group/u/epagone)\
**Post date:** [September 25, 2023, 1:04pm UTC](https://fortran-lang.discourse.group/t/local-package-dependency/6558/3 "2023-09-25T13:04:10Z")

</div>

Hi @SamuG, welcome!

The correct syntax [should be](https://fpm.fortran-lang.org/spec/manifest.html#local-dependencies)

```toml
[dependencies]
mypackage = { path = "path/to/mypackage" }

```

PS: Ooops, I can see you’ve already received the correct answer ahah!
