Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong dist path using pyarmor.py build #13

Closed
joonis opened this issue Mar 18, 2018 · 6 comments
Closed

Wrong dist path using pyarmor.py build #13

joonis opened this issue Mar 18, 2018 · 6 comments

Comments

@joonis
Copy link
Contributor

joonis commented Mar 18, 2018

Using pyarmor.py build /path/to/project creates the dist folder in the current working directory. Shouldn't the target dist be located in the specified project directory?

@jondy
Copy link
Contributor

jondy commented Mar 18, 2018

The prefer way to run command build is

cd /path/to/project
./pyarmor build

So it's same as project directory. And if run command build in some other path, save the output here.

@joonis
Copy link
Contributor Author

joonis commented Mar 18, 2018

Maybe you could add an optional argument --output, since it is a bit annoying if you have a script to automate thing and you have to cd around the system.

@joonis
Copy link
Contributor Author

joonis commented Mar 18, 2018

By default, the target folder should be dist/[src_folder_name] if src_folder contains an __init__.py file. Because in this case we have a package and we need this extra folder. All runtime files should still go directly into dist/ of course.

@jondy
Copy link
Contributor

jondy commented Mar 18, 2018

The default output path of project can be changed by command config, for example

cd /path/to/project
./pyarmor config --output=/absolute/path/to/dist/pkgname
./pyarmor build

# or in any other path
pyarmor.py build /path/to/project

@jondy
Copy link
Contributor

jondy commented Mar 19, 2018

I have added optional argument --output for command build, it will override the output path in project configuration file. So the build script for package would be:

# First make runtime files only
pyarmor.py build --only-runtime --output=/path/to/dist /path/to/project
# Then obfuscate package without runtime files
pyarmor.py build --no-runtime --output=/path/to/dist/package_name /path/to/project

@joonis
Copy link
Contributor Author

joonis commented Mar 19, 2018

Thanks, that's ok for me - didn't know about the config option.

However a user would expect to get the ready-to-run package in /dist without having to specify an --output path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants