@@ -102,7 +102,7 @@ Notice, when a specific scenario is specified, there is more information display
102102A scenario can be used to generate packages and build distributions:
103103
104104``` bash
105- packse build scenario/example.json
105+ packse build scenario/example.toml
106106```
107107
108108The ` build/ ` directory will contain sources for all of the packages in the scenario.
@@ -116,71 +116,49 @@ publishing multiple times to a registry that does not allow overwrites.
116116The ` PACKSE_VERSION_SEED ` environment variable can be used to override the seed used to generate the unique
117117identifier, allowing versions to differ based on information outside of packse.
118118
119- ### Publishing scenarios
120-
121- Built scenarios can be published to a Python Package Index with the ` publish ` command:
122-
123- ``` bash
124- packse publish dist/example-cd797223
125- ```
126-
127- By default, packages are published to the Test PyPI server.
128-
129- Credentials must be provided via the ` PACKSE_PYPI_PASSWORD ` environment variable. ` PACKSE_PYPI_USERNAME ` can be
130- used to set a username if not using an API token. If using a server which does not require authentication, the
131- ` --anonymous ` flag can be passed.
132-
133119### Running a package index
134120
135- _ Requires installation with the ` index ` extra_
121+ _ Requires installation with the ` serve ` extra_
136122
137- A local package index can be controlled with the ` index ` command. For example, to start a local package index:
123+ To start a local package index:
138124
139125``` bash
140- packse index up
126+ packse serve
141127```
142128
143- The ` --bg ` flag can be passed to run the index in the background.
144- When running an index in the background, state will be stored in the ` ~/.packse ` directory. The ` PACKSE_STATE_PATH `
145- environment variable can be used to change the state path.
146-
147129Packages can be installed by passing the ` --index-url ` flag to the installer e.g. with ` pip ` :
148130
149131``` bash
150- pip install --index-url http://127.0.0.1:3141 example-0611cb74
132+ pip install --index-url http://127.0.0.1:3141/simple-html example-a-e656679f
151133```
152134
153- Packages can be published to the index by providing the ` --index-url ` and ` --anonymous ` flags to the ` publish ` command :
135+ To also include build dependencies, use the ` /vendor ` subdirectory :
154136
155137``` bash
156- packse publish dist/example-cd797223 --index-url http://localhost :3141 --anonymous
138+ pip install --index-url http://127.0.0.1:3141/simple-html --find-links http://127.0.0.1 :3141/vendor example-a-e656679f
157139```
158140
159- Packages can also be published to the index by placing their distributions in the configured ` --dist-dir ` . This defaults
160- to ` ./dist ` which is also the default location used in ` packse build ` .
161-
162- By default, the index will fallback to PyPI for missing packages. To test in isolation, use the ` --offline ` flag.
163-
164- To stop an index running in the background use ` packse index down ` :
141+ Packse will watch for changes to the ` scenarios ` directory, and publish new versions on each change.
165142
166- ```
167- packse index down
168- ```
143+ Note when developing, it is often useful to use the ` --no-hash ` flag to avoid having to determine the latest
144+ hash for the scenario.
169145
170- ### Serving scenarios
146+ ### Building a package index
171147
172- _ Requires installation with the ` serve ` extra_
148+ _ Requires installation with the ` index ` extra_
173149
174- The ` serve ` command can be used to host, build, and publish scenarios in one step.
150+ Packse can build a file tree that can be served statically, for example, through GitHub Pages, that serve both
151+ the scenarios and the vendored build dependencies, using the ` index ` command:
175152
176153``` bash
177- packse serve scenarios
154+ packse index build
178155```
179156
180- Packse will watch for changes to the ` scenarios ` directory, and publish new versions on each change.
157+ This creates three directories in ` ./index ` :
181158
182- Note when developing, it is often useful to use the ` --no-hash ` flag to avoid having to determine the latest
183- hash for the scenario.
159+ * ` ./index/files ` : The distributions.
160+ * ` ./index/simple-html ` : The simple HTML index (PEP 503).
161+ * ` ./index/vendor ` : A flat index of build dependencies.
184162
185163### Testing scenarios
186164
@@ -189,7 +167,7 @@ Published scenarios can then be tested with your choice of package manager.
189167For example, with ` pip ` :
190168
191169``` bash
192- pip install -i https://test.pypi.org/ simple/ example-cd797223
170+ pip install -i https://astral-sh.github.io/packse/548262f/ simple-html / example-cd797223
193171```
194172
195173### Exporting scenarios
0 commit comments