mirror of
https://github.com/kirsle/kirsle.net
synced 2024-12-22 23:19:28 +00:00
2.2 KiB
2.2 KiB
Publishing RiveScript Modules
My personal notes on how to distribute releases of RiveScript to various language module repositories.
Python
If this is the first time publishing from a new computer, create ~/.pypirc
with your PyPI credentials:
[distutils]
index-servers=pypi
[pypi]
repository = https://pypi.python.org/pypi
username = $USERNAME
password = $PASSWORD
Make sure everything's ready to go (version numbers incremented, documentation rebuilt, etc.) and run this command to create all the distributable items:
# Install the requirements to get the bdist_wheel command
$ pip install -r requirements.txt
$ python setup.py sdist bdist_wheel
This generates files in the dist/
folder:
sdist
creates the source tarballbdist_wheel
creates a portable pre-built wheel file (the new "egg")bdist_rpm
creates an RPM (not necessary to upload this to PyPI)bdist_wininst
creates a Win32 installer (not necessary to upload this to PyPI)
And to upload to PyPI:
$ pip install twine
$ twine upload dist/*
See also: https://python-packaging-user-guide.readthedocs.org/en/latest/distributing/#packaging-your-project
Build RPM
See also: https://fedoraproject.org/wiki/Packaging:Python
To build the RPM for Fedora:
$ rpmbuild -ba python-rivescript.spec
JavaScript
- Prepare it for NPM distribution:
- Build distributable (compiled JS) files:
grunt dist
- Test an installation from a different directory:
npm install ../rivescript-js
and make sure it works. - From the rivescript-js folder,
npm login
if it's the first time on a new PC andnpm publish
to publish.
- Build distributable (compiled JS) files:
- Create release tarballs for GitHub binary distribution:
- Build distributable files:
grunt dist
- Remove cruft:
rm -rf node_modules
- Go up a directory to create zip/tar files
zip -r rivescript-js-1.1.2.zip rivescript-js -x '*.git*'
tar -czvf rivescript-js-1.1.2.tar.gz rivescript-js --exclude .git
- Build distributable files:
See also: npm developers
Perl
perl Makefile.PL
make
make dist
Upload resulting tarball to PAUSE for indexing on CPAN.