Publishing your package to the ActiveState catalog allows the Platform to build the package and make it available to everyone in your organization. This is currently only available for Linux users.
Ensure the following conditions are met before you begin
.tar
file of the source code of your packageThe following will walk you through the process of
To publish to the ActiveState Platform
.tar
file, convert it to a tar filestate publish \
--namespace private/<orgname>/<language> \
--name <package-name> \
--version <version-number> \
--description "<package-description>" \
--author "name <<email>> \
--depend "<builder/python-module-builder@>=0>" \
--feature private/<org-name>/<language>/<package-name>@<version-number> \
--feature language/<language>/<package-name>@<version-number> \
<file-name>
email
, one set must remain in the final code)file-name
, namespace, package-name
, version-number
and builder dependency with the --depend
flag are all necessary for a successful publication.--depend
linesExample: if you want to use a custom version of the python package django, your command should appear as follows:
state publish \
--namespace private/<orgname>/python \
--name django \
--version 5.1.8 \
--description "<package-description>" \
--author "name <<email>> \
--depend "<builder/python-module-builder@>=0>" \
--depend "<language/python/setuptools@>=75.8.1>" \
--feature private/<org-name>/python/django@5.1.8 \
--feature language/python/django@5.1.8 \
<file-name>
Note the two --depend...
lines.
--depend
line defines the builder required to build your django project--depend
line gives the builder a list of dependencies required to build the project. This information comes directly from the pyproject.toml found on the repository for django 5.1.8.Running this command will publish your package to the ActiveState Platform.
Wait for a confirmation message in your terminal. If prompted, press y
to confirm.
To publish to the ActiveState Platform using your project’s .yaml
file
.tar
file.name: <package-name>
namespace: private/<orgname>/<language>
version: "<version-number>"
description: <package-description>
authors:
- name: <author-name>
email: <author-email>
dependencies:
- dependency:
name: <dependency-name>
namespace: <dependency-namespace>
versionRequirements: '>=0'
features:
- name: <package-name>
namespace: private/<orgname>/<language>
version: "<version-number>"
--depend
linesExample: if you want to use a custom version of the python package django, your command should appear as follows:
name: django
namespace: private/<orgname>/python
version: "5.1.8"
description: <package-description>
authors:
- name: <author-name>
email: <author-email>
dependencies:
- dependency:
name: python-module-builder
namespace: builder
versionRequirements: '>=0'
- dependency:
name: setuptools
namespace: language/python
versionRequirements: '>=75.8.1'
features:
- name: django
namespace: private/<orgname>/python
version: "5.1.8"
- name: django
namespace: language/python
version: "5.1.8"
After completing the file and saving it to your working directory, enter the following into your command line to publish the package to the ActiveState Platform
state publish --meta <yaml-file>.yaml <package-file>
For example
state publish --meta my-project.yaml TAR_FILE.tar.gz
Your package is now available on the ActiveState Platform. To install your package to your local system, either create a secure shell environment using
state shell <orgname>/<projectname>
Or begin using a previously checked-out project by entering
state use <orgname>/<projectname>
Install the newly published package to the runtime environment by entering
state install <package-name>
Your package is now installed to your project and available to use. Note that publishing a new package may cause other packages in your project to be rebuilt, leading to a longer build time.
If you choose to upload a python wheel, the file name of the wheel must conform to the standards described here. For example, if you upload a patched version of django 5.1.8, you must name your django wheel “Django-5.1.8”. This allows the ActiveState Platform to find and build from your wheel.