# Integrate package into main document

My document uses (via \usepackage) a non-standard local package, that I have written. The document has to be uploaded to a publisher, and apparently they do not offer a way to upload the package as well. Is there any way to copy the contents of the package into the main document and still have all the options for the package working in some way? It uses the kvoptions package.

The alternative would be to convert the package into a normal TeX file that can be included via \input. Options could be passed in by commands that have to be defined prior to loading, instead of using key-value options. I will do this if nothing more elegant is possible.

\begin{filecontents}{mypackage.sty}