Compare commits
12 Commits
cb5991f342
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 68a5c49062 | |||
| e9be85d5fd | |||
| 8540f184aa | |||
| 9edb9ce768 | |||
| 446fdcca15 | |||
| 86d72fadda | |||
| b9d720a944 | |||
| dadd86183b | |||
| d22abc2ae5 | |||
| 5d3c86f976 | |||
| 269e34c1ac | |||
| dc8f7a5d76 |
63
README.md
63
README.md
@@ -1,3 +1,64 @@
|
|||||||
# Nebula
|
# Nebula <img src="icon/icon.svg" width = 24>
|
||||||
|
|
||||||
The package manager for the Comet programming language.
|
The package manager for the Comet programming language.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
Nebula can be installed using `pipx` with the following command:
|
||||||
|
> pipx install nebpkg
|
||||||
|
or from `pip`:
|
||||||
|
> pip3 install nebpkg
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Nebula has several subcommands. Type `neb --help` to see the help menu.
|
||||||
|
|
||||||
|
### Getting package index
|
||||||
|
|
||||||
|
> neb pull
|
||||||
|
|
||||||
|
### Installing a package
|
||||||
|
|
||||||
|
> neb install <package_name>
|
||||||
|
|
||||||
|
You can provide a version with an @ symbol:
|
||||||
|
|
||||||
|
> neb install io@0.1.0
|
||||||
|
|
||||||
|
### Uninstalling a package
|
||||||
|
|
||||||
|
> neb uninstall <package_name>
|
||||||
|
|
||||||
|
### Searching for packages
|
||||||
|
|
||||||
|
> neb search <query>
|
||||||
|
|
||||||
|
By default the command won't show packages you already have installed, you can include installed packages with the `--show-installed` option.
|
||||||
|
|
||||||
|
### Listing installed packages
|
||||||
|
|
||||||
|
> neb list
|
||||||
|
|
||||||
|
### Building a package
|
||||||
|
|
||||||
|
You can use Nebula to build your package you're developing in C. Run the following command from the root of your package, and ensure you have a `src` directory:
|
||||||
|
|
||||||
|
> neb build .
|
||||||
|
|
||||||
|
You can replace the `.` with a directory if you want to build a directory as a package.
|
||||||
|
|
||||||
|
## How do I make a package?
|
||||||
|
There are some templates that you can use created by the Comet group. There is a [tutorial](https://chookspace.com/Comet/Comet/wiki/External+Libs+-+Table+of+Contents.-) on the [Comet repo's wiki](https://chookspace.com/Comet/Comet/wiki) with documentation on creating external libraries.
|
||||||
|
|
||||||
|
## Getting a package on Nebula
|
||||||
|
First, create a repository with your package. Once you've done that, submit a pull request with a commit editting the `package_index.json` file in the Nebula repository. Add the following the the index:
|
||||||
|
|
||||||
|
```json
|
||||||
|
...
|
||||||
|
"your_package_name": {
|
||||||
|
"repository": "https://chookspace.com/owner of the package/your package name",
|
||||||
|
"description": "description here",
|
||||||
|
"gitAuthor": "owner of the package"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Your package will be checked and if all is well, added to the Nebula index!
|
||||||
BIN
icon/icon.png
Normal file
BIN
icon/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
213
icon/icon.svg
Normal file
213
icon/icon.svg
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="108.14108mm"
|
||||||
|
height="108.9766mm"
|
||||||
|
viewBox="0 0 108.14108 108.9766"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
inkscape:version="1.4.4 (dcaf3e7d9e, 2026-05-05)"
|
||||||
|
sodipodi:docname="nebula.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="0.98466434"
|
||||||
|
inkscape:cx="320.41376"
|
||||||
|
inkscape:cy="536.73112"
|
||||||
|
inkscape:window-width="1902"
|
||||||
|
inkscape:window-height="1182"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<inkscape:page
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="108.14108"
|
||||||
|
height="108.9766"
|
||||||
|
id="page2"
|
||||||
|
margin="0"
|
||||||
|
bleed="0" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs1">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient18"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#8700ff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop18" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#8700ff;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop19" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient12"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#1700ff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop12" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d000ff;stop-opacity:0.99730557;"
|
||||||
|
offset="1"
|
||||||
|
id="stop13" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient12"
|
||||||
|
id="linearGradient13"
|
||||||
|
x1="52.299892"
|
||||||
|
y1="174.64995"
|
||||||
|
x2="158.8015"
|
||||||
|
y2="66.563499"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient18"
|
||||||
|
id="linearGradient19"
|
||||||
|
x1="56.807556"
|
||||||
|
y1="161.30161"
|
||||||
|
x2="132.94005"
|
||||||
|
y2="97.902985"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient12"
|
||||||
|
id="linearGradient2"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="52.299892"
|
||||||
|
y1="174.64995"
|
||||||
|
x2="158.8015"
|
||||||
|
y2="66.563499" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient12"
|
||||||
|
id="linearGradient3"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="52.299892"
|
||||||
|
y1="174.64995"
|
||||||
|
x2="158.8015"
|
||||||
|
y2="66.563499" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient12"
|
||||||
|
id="linearGradient4"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="52.299892"
|
||||||
|
y1="174.64995"
|
||||||
|
x2="158.8015"
|
||||||
|
y2="66.563499" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient12"
|
||||||
|
id="linearGradient5"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="52.299892"
|
||||||
|
y1="174.64995"
|
||||||
|
x2="158.8015"
|
||||||
|
y2="66.563499" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-52.675344,-65.589562)">
|
||||||
|
<g
|
||||||
|
id="g11"
|
||||||
|
style="fill:url(#linearGradient5);fill-opacity:1">
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:url(#linearGradient2);fill-opacity:1;stroke-width:1;stroke-opacity:0"
|
||||||
|
id="path1-3"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="68.465317"
|
||||||
|
sodipodi:cy="37.402348"
|
||||||
|
sodipodi:r1="16.365551"
|
||||||
|
sodipodi:r2="27.275919"
|
||||||
|
sodipodi:arg1="1.6056659"
|
||||||
|
sodipodi:arg2="2.2339844"
|
||||||
|
inkscape:rounded="0.1"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="M 67.894773,53.75795 C 66.194219,53.698629 53.014289,59.94424 51.67338,58.896687 50.332472,57.849134 53.202988,43.549541 52.733906,41.913887 52.264825,40.278233 42.252073,29.673375 42.833991,28.074383 43.41591,26.475392 57.902669,24.786598 59.313315,23.83503 60.72396,22.883461 67.715669,10.083687 69.416223,10.143009 c 1.700554,0.05932 7.783347,13.315183 9.124256,14.362735 1.340908,1.047553 15.674774,3.741716 16.143855,5.37737 0.469082,1.635654 -10.258304,11.517021 -10.840223,13.116012 -0.581918,1.598992 1.285189,16.06385 -0.125456,17.015418 -1.410646,0.951568 -14.123329,-6.197272 -15.823882,-6.256594 z"
|
||||||
|
inkscape:transform-center-x="-0.27412446"
|
||||||
|
inkscape:transform-center-y="3.605856"
|
||||||
|
transform="matrix(0.5797936,-0.00236781,-0.00388735,0.56613416,32.464348,60.533216)" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:url(#linearGradient3);fill-opacity:1;stroke-width:1;stroke-opacity:0"
|
||||||
|
id="path1-3-1"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="68.465317"
|
||||||
|
sodipodi:cy="37.402348"
|
||||||
|
sodipodi:r1="16.365551"
|
||||||
|
sodipodi:r2="27.275919"
|
||||||
|
sodipodi:arg1="1.6056659"
|
||||||
|
sodipodi:arg2="2.2339844"
|
||||||
|
inkscape:rounded="0.1"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="M 67.894773,53.75795 C 66.194219,53.698629 53.014289,59.94424 51.67338,58.896687 50.332472,57.849134 53.202988,43.549541 52.733906,41.913887 52.264825,40.278233 42.252073,29.673375 42.833991,28.074383 43.41591,26.475392 57.902669,24.786598 59.313315,23.83503 60.72396,22.883461 67.715669,10.083687 69.416223,10.143009 c 1.700554,0.05932 7.783347,13.315183 9.124256,14.362735 1.340908,1.047553 15.674774,3.741716 16.143855,5.37737 0.469082,1.635654 -10.258304,11.517021 -10.840223,13.116012 -0.581918,1.598992 1.285189,16.06385 -0.125456,17.015418 -1.410646,0.951568 -14.123329,-6.197272 -15.823882,-6.256594 z"
|
||||||
|
inkscape:transform-center-x="0.43596454"
|
||||||
|
inkscape:transform-center-y="4.9929336"
|
||||||
|
transform="matrix(0.54571461,0.19586168,-0.19707368,0.53074001,99.342937,61.979313)" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:url(#linearGradient4);fill-opacity:1;stroke-width:1;stroke-opacity:0"
|
||||||
|
id="path1-3-3"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="68.465317"
|
||||||
|
sodipodi:cy="37.402348"
|
||||||
|
sodipodi:r1="16.365551"
|
||||||
|
sodipodi:r2="27.275919"
|
||||||
|
sodipodi:arg1="1.6056659"
|
||||||
|
sodipodi:arg2="2.2339844"
|
||||||
|
inkscape:rounded="0.1"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="M 67.894773,53.75795 C 66.194219,53.698629 53.014289,59.94424 51.67338,58.896687 50.332472,57.849134 53.202988,43.549541 52.733906,41.913887 52.264825,40.278233 42.252073,29.673375 42.833991,28.074383 43.41591,26.475392 57.902669,24.786598 59.313315,23.83503 60.72396,22.883461 67.715669,10.083687 69.416223,10.143009 c 1.700554,0.05932 7.783347,13.315183 9.124256,14.362735 1.340908,1.047553 15.674774,3.741716 16.143855,5.37737 0.469082,1.635654 -10.258304,11.517021 -10.840223,13.116012 -0.581918,1.598992 1.285189,16.06385 -0.125456,17.015418 -1.410646,0.951568 -14.123329,-6.197272 -15.823882,-6.256594 z"
|
||||||
|
inkscape:transform-center-x="-0.91616451"
|
||||||
|
inkscape:transform-center-y="4.8624556"
|
||||||
|
transform="matrix(0.52700569,-0.24172553,0.23038527,0.51715145,101.8511,156.59301)" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient19);fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1"
|
||||||
|
d="m 52.791748,117.03625 77.250592,-51.44669 30.77409,56.29114 -59.35035,52.13764 z"
|
||||||
|
id="path18"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:url(#linearGradient13);fill-opacity:1;stroke-width:1;stroke-opacity:0"
|
||||||
|
id="path1"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="68.465317"
|
||||||
|
sodipodi:cy="37.402348"
|
||||||
|
sodipodi:r1="16.365551"
|
||||||
|
sodipodi:r2="27.275919"
|
||||||
|
sodipodi:arg1="1.6056659"
|
||||||
|
sodipodi:arg2="2.2339844"
|
||||||
|
inkscape:rounded="0.1"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="M 67.894773,53.75795 C 66.194219,53.698629 53.014289,59.94424 51.67338,58.896687 50.332472,57.849134 53.202988,43.549541 52.733906,41.913887 52.264825,40.278233 42.252073,29.673375 42.833991,28.074383 43.41591,26.475392 57.902669,24.786598 59.313315,23.83503 60.72396,22.883461 67.715669,10.083687 69.416223,10.143009 c 1.700554,0.05932 7.783347,13.315183 9.124256,14.362735 1.340908,1.047553 15.674774,3.741716 16.143855,5.37737 0.469082,1.635654 -10.258304,11.517021 -10.840223,13.116012 -0.581918,1.598992 1.285189,16.06385 -0.125456,17.015418 -1.410646,0.951568 -14.123329,-6.197272 -15.823882,-6.256594 z"
|
||||||
|
inkscape:transform-center-x="-0.54843388"
|
||||||
|
inkscape:transform-center-y="11.364464"
|
||||||
|
transform="matrix(1.425898,0.3038747,-0.31194838,1.3889937,0.467795,65.035221)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 9.0 KiB |
@@ -8,7 +8,7 @@ There is also Github mirror of Comet if you would prefer that: https://github.co
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Installing a Package
|
### Installing a Package
|
||||||
To install a package type:
|
To install a rock type:
|
||||||
```
|
```
|
||||||
neb install packageName
|
neb install packageName
|
||||||
```
|
```
|
||||||
@@ -16,12 +16,16 @@ Or if you wish to install a particular version:
|
|||||||
```
|
```
|
||||||
neb install packageName@1.0.0
|
neb install packageName@1.0.0
|
||||||
```
|
```
|
||||||
(replace the number with the version number of the package you want to install)
|
(replace the number with the version number of the rock you want to install)
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
### 1.2.1
|
||||||
|
- Made `neb build` look for C files in a src/ folder instead of the current folder
|
||||||
|
|
||||||
### 1.2.0
|
### 1.2.0
|
||||||
- Add support for modules written in Comet
|
- Add support for modules written in Comet
|
||||||
- Made it so that you don't have to build Comet to install the headers
|
- Made it so that you don't have to build Comet to install the headers
|
||||||
|
- Added the `neb build` command to make it easier to develop rocks
|
||||||
|
|
||||||
### 1.1.0
|
### 1.1.0
|
||||||
- Switched from getting the latest commit of packages to getting the latest release
|
- Switched from getting the latest commit of packages to getting the latest release
|
||||||
|
|||||||
33
neb/src/build.py
Normal file
33
neb/src/build.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from .util import libs_dir, print_error_message
|
||||||
|
from .console import console
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import glob
|
||||||
|
import pathlib
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
def build(args):
|
||||||
|
comet_libs_dir = libs_dir()
|
||||||
|
|
||||||
|
folder_path = pathlib.Path(args.path).resolve()
|
||||||
|
folder_name = folder_path.name
|
||||||
|
|
||||||
|
out_path = os.path.join(comet_libs_dir, f"{folder_name}.cometlib")
|
||||||
|
|
||||||
|
c_files = glob.glob(f"{args.path}/src/*.c", recursive=True)
|
||||||
|
if len(c_files) == 0:
|
||||||
|
print_error_message(f"No C files were found in that directory! [d white]({folder_name}/src)[/d white]")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
with console.status("Building", spinner="moon") as status:
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
["gcc"] + c_files + ["-fPIC", "-shared", "-Wl,-undefined,symbol_lookup", "-o", out_path] + args.gcc_args,
|
||||||
|
check=True
|
||||||
|
)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print_error_message(f"Failed to install [b]{folder_name}[/]: build failed!")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
console.log(f"[b][:white_check_mark:] Installed [green]{folder_name}[/green]![/b]")
|
||||||
@@ -7,6 +7,7 @@ from .pull import pull
|
|||||||
from .list import list_packages
|
from .list import list_packages
|
||||||
from .uninstall import uninstall
|
from .uninstall import uninstall
|
||||||
from .search import search
|
from .search import search
|
||||||
|
from .build import build
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
def main() -> int:
|
||||||
@@ -31,6 +32,11 @@ def main() -> int:
|
|||||||
uninstall_cmd = sub_parsers.add_parser(name="uninstall", description="uninstall an installed rock(s)")
|
uninstall_cmd = sub_parsers.add_parser(name="uninstall", description="uninstall an installed rock(s)")
|
||||||
uninstall_cmd.add_argument("names", help="name of the rocks to uninstall", nargs="+")
|
uninstall_cmd.add_argument("names", help="name of the rocks to uninstall", nargs="+")
|
||||||
|
|
||||||
|
# build command
|
||||||
|
build_cmd = sub_parsers.add_parser(name="build", description="build a module")
|
||||||
|
build_cmd.add_argument("path", help="the path to build from")
|
||||||
|
build_cmd.add_argument("gcc_args", nargs=argparse.REMAINDER, help="args to give to gcc")
|
||||||
|
|
||||||
# search command
|
# search command
|
||||||
search_cmd = sub_parsers.add_parser(name="search", description="search for rocks")
|
search_cmd = sub_parsers.add_parser(name="search", description="search for rocks")
|
||||||
search_cmd.add_argument("query", help="search query")
|
search_cmd.add_argument("query", help="search query")
|
||||||
@@ -55,6 +61,8 @@ def main() -> int:
|
|||||||
uninstall(args)
|
uninstall(args)
|
||||||
case "search":
|
case "search":
|
||||||
search(args)
|
search(args)
|
||||||
|
case "build":
|
||||||
|
build(args)
|
||||||
|
|
||||||
# really feeling like a C programmer lmao
|
# really feeling like a C programmer lmao
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
"description": "Input / Output in Comet.",
|
"description": "Input / Output in Comet.",
|
||||||
"gitAuthor": "Comet"
|
"gitAuthor": "Comet"
|
||||||
},
|
},
|
||||||
"test": {
|
"socket": {
|
||||||
"repository": "https://chookspace.com/SpookyDervish/test",
|
"repository": "https://chookspace.com/Comet/socket",
|
||||||
"description": "Test rock for installing and using libraries written natively in Comet.",
|
"description": "Socket implementation in Comet.",
|
||||||
"gitAuthor": "SpookyDervish"
|
"gitAuthor": "Comet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
2
setup.py
2
setup.py
@@ -5,7 +5,7 @@ with open("neb/README.md", "r") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="nebpkg",
|
name="nebpkg",
|
||||||
version="1.2.0",
|
version="1.2.1",
|
||||||
description="Nebula, the package manager for the Comet programming language.",
|
description="Nebula, the package manager for the Comet programming language.",
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
|
|||||||
Reference in New Issue
Block a user